How do I add color to a string

I know that you can add color to text, and have done it in a few projects using this code:

crimeSeverityText.text = "Crime Severity : <color=#008000FF>Mild</color>";

But I can’t figure out how to color this text:

text.text = "Talk to " + "< color =#FDE67FFF> collision.transform.name </color>";

I’m trying to color collision.transform.name, and have tried both

"< color =#FDE67FFF> collision.transform.name </color>"
and
"< color =#FDE67FFF>" + collision.transform.name + "</color>"

but neither are working for me

I am not sure if it matters, but you have spaces around “< color =” part. Does removing the spaces work?