Quick answer: Enable Rich Text on the TMP component. Tags then parse instead of rendering literally.

Display "<color=red>Hit</color>" as red. Shows the literal angle brackets instead. Rich Text was off.

The Fix

TextMeshProUGUI inspector:
  Rich Text:    true

// or via script
text.richText = true;
text.text = "<color=red>Hit</color> Critical!";

Rich Text is per-component flag. Enable for any component that should parse formatting.

Verifying

Color tags render colored. Without flag: tags appear as literal characters.

“Rich Text on. Tags parse.”

Related Issues

For TMP atlas missing glyph, see atlas glyph. For TMP InputField caret, see caret.

Rich Text on. Color renders.