So the title is a bit vague. For users that are Rank "Administrator" they have a color code of HEX: #660000. Mods: #70DB70. Users: #000000. None of these colors appear in the text area. At first I thought maybe the code isn't going through but it is, here is the message being received from the server:
{"type":"SEND_MESSAGE","sender":"HalloTast","message":"ee","color":"#660000"}
and just appears as this
Then I thought maybe it didn't work because it was a HEX color so I looked it up and curtsey of another question, I found this:
public static Color hex2Rgb(String colorStr) {
return new Color(
Integer.valueOf( colorStr.substring( 1, 3 ), 16 ),
Integer.valueOf( colorStr.substring( 3, 5 ), 16 ),
Integer.valueOf( colorStr.substring( 5, 7 ), 16 ) );
}
then I would assign that as the color. Still didn't work. Just black like in the previous screenshot. So I tried just putting in Color.RED when it was needed on the client end and it worked like so: