There is a way to do it all client-side, but it's not considered good programming. So before anyone jumps all over the vote-down button, please note I'm acknowledging that it's not good programming. Please also note that sometimes in order to achieve a desired effect it is easiest to step outside the bounds of 'good programming'. User discretion is advised. :)
Define some css class that are used only for colors, like so :
.blue_background {
background-color:blue;
}
.red_foreground {
color:red;
}
Then in the html of whatever element you want to be that color just add one of the color classes:
<p class="red_foreground">hello</p>
If the element already has a class or needs two of the color classes, elements can have multiple classes. Just separate with a space:
<p class="red_foreground blue_background etc">hello</p>