Well, no.. this could be done in PHP, too.
PHP Code:
<?
$colors = array(
'a' => 'red',
'b' => 'blue',
'c' => 'green',
'd' => '#CFCFCD',
etc ..
);
$input = 'abcdefghi..';
$letters = preg_split('//', $input -1, PREG_SPLIT_NO_EMPTY);
foreach($letters as $letter)
{
echo '<span style="font-color:' . $colors[$letter] . '">' . $letter . '</span>';
}
?>
Just an example, but it could be expanded on.. for example, make it a function and just call it whenever you want it.
PHP Code:
function omgcolors(text)
{
$letters = preg_split('//', $text, -1, PREG_SPLIT_NO_EMPTY);
foreach($letters as $letter)
{
$output .= '<span style="font-color:' . $colors[$letter] . '">' . $letter . '</span>';
}
return $output;
}
Then you could just call it when needed.
ie.
Code:
omgcolors($bbusername);