I'm using the font html tag and the color attribute to return colored labels. I've read online that arcade supports this html tag. Here is my script:
var pct = $feature.PCT_NO;
var label = "Precinct " + $feature.PCT_NO;
var color = when(
pct == 1, "#FF0000",
pct == 2, "blue",
pct == 3, "green",
pct == 4, "orange",
"black"
);
return "<font color='" + color + "'>" + label + "</font>";
What is returned on the map is not colored text, but the actual html text in black.