First thing: don't use the <font> element. It's been deprecated for like twenty years now. SugarCube has custom style markup for just this kind of situation.
TME answered a very similar question not very long ago, so I recommend looking at that. The cliff notes version is that you can either add the markup you need to the variable itself or use a widget. Examples:
—> variable method
<<set $name to "@@color:red;" + $name + "@@">>
—> widget method (this code goes in a widget-tagged passage)
<<widget "name">>\
@@color:red;$name@@\
<</widget>>
All things being equal, I would go with the widget.
It's also possible to use classes instead of individual style rules, if you're doing more than just changing the color.