As far as I’m aware Anki can’t do that, because color directives are not valid in all contexts inside MathJax.