  We analyze theories with color-kinematics duality from an algebraic
perspective and find that any such theory has an underlying BV${}^{\color{gray}
\blacksquare}$-algebra structure, extending the ideas of arXiv:1912.03110.
Conversely, we show that any theory with a BV${}^{\color{gray}
\blacksquare}$-algebra features a kinematic Lie algebra that controls
interaction vertices, both on- and off-shell. We explain that the archetypal
example of a theory with BV${}^{\color{gray} \blacksquare}$-algebra is
Chern-Simons theory, for which the resulting kinematic Lie algebra is
isomorphic to the Schouten-Nijenhuis algebra on multivector fields. The
BV${}^{\color{gray} \blacksquare}$-algebra implies the known color-kinematics
duality of Chern-Simons theory. Similarly, we show that holomorphic and
Cauchy-Riemann (CR) Chern-Simons theories come with BV${}^{\color{gray}
\blacksquare}$-algebras and that, on the appropriate twistor spaces, these
theories organize and identify kinematic Lie algebras for self-dual and full
Yang-Mills theories, as well as the currents of any field theory with a
twistorial description. We show that this result extends to the loop level
under certain assumptions.
