I've moved the definition of the colors to the CSS, which allows to asign different colours depending on the Theme (e.g. Dark or Light Theme as well as other styles (bold, underline, font ...).
In addition, I've added a "title" to the element, which takes the translation of the user class from the language files and will show when the mose hover the user name. So for example it will show "Member" with English language and "Membre" with french language.
Here my code example.
In backend/functions.php
case 1: // Member
$col = "member"; $title = T_("MEMBER");
break;
and
return unesc("<span class='".$col."' title='".$title."'>".$name."".$star."".$warn."".$disabled."</span>");
in the CSS for the class:
.member {
color: #00AA00; /* Green */
}
Which in my case just defines a colour (I've tried a loat with shadows to enhance contrast, but the results were not satisfying. CSS experts certainly can make a lot with that).
Finally I want to express a big thank you to the contributors here MVP, BigMax, Tiloup, TorrentialStorm, ArcticWolf and all those I've forgotten to name, which with their modifications allow me to adapt my site to what I've in mind for it. I'm currently in the middle of it and as a side effect learn PHP (the trial, error, google, correct, ... way).