We show that the Lorentz and the SU(3) groups can be derived from the covariance principle conserving a $Z_3$-graded three-form on a $Z_3$-graded cubic algebra representing quarks endowed with non-standard commutation laws.