We elaborate on the color-kinematics duality for off-shell diagrams in gauge theories coupled to matter, by investigating the scattering process gg → ss, qq, gg, and show that the Jacobi relations for the kinematic numerators of off-shell diagrams, built with Feynman rules in axial gauge, reduce to a color-kinematics violating term due to the contributions of sub-graphs only. Such anomaly vanishes when the four particles connected by the Jacobi relation are on their mass shell with vanishing squared momenta, being either external or cut particles, where the validity of the color-kinematics duality is recovered. We discuss the role of the off-shell decomposition in the direct construction of higher-multiplicity numerators satisfying color-kinematics identity in four as well as in d dimensions, for the latter employing the Four Dimensional Formalism variant of the Four Dimensional Helicity scheme. We provide explicit examples for the QCD process gg → qqg.