Page 1 of 1

KaM Remake chat color markup

PostPosted: 17 Apr 2014, 14:19
by Lewin
Someone sent me a PM asking how the chat color markup works, so I thought I'd write a quick guide. For those of you who don't know you can make chat text colored by using markup:
  Code:
This text is normal colored, but [$0000FF]this text is red[], except for this last bit which is normal colored too.
[$123456] sets the color for text following it to the color code 123456 (I'll explain that in a moment), and [] resets the color back to default.

The color code is kind of like in HTML but reversed. It has three sections: Blue, Green and Red:
BBGGRR
The each of these three codes are in hexadecimal (base 16, unlike base 10 which we usually use). In hexadecimal FF is the highest number you can represent with 2 digits (like our 99). So:
[$FF0000] is full blue
[$00FF00] is full green
[$0000FF] is full red

An easier way to pick a color is to use this website:
http://www.colorpicker.com/
But that site is for RRGGBB (we use BBGGRR), so you must swap the red and blue digits. For example if you chose the orange color E37512 from the site, to use that in the KaM Remake you swap the first 2 and last 2 digits which gives you: 1275E3.

Re: KaM Remake chat color markup

PostPosted: 17 Apr 2014, 14:46
by Ben
I should delete this thread. This is supposed to be a secret!! :(

Nah just kidding. Jeronimo should be happy :P

Re: KaM Remake chat color markup

PostPosted: 17 Apr 2014, 15:43
by KaMRemakefan
Thanks for help Lewin!
Ben shut up and make shoutcasts :mrgreen:

Re: KaM Remake chat color markup

PostPosted: 17 Apr 2014, 15:54
by pawel95
I should delete this thread. This is supposed to be a secret!! :(

Nah just kidding. Jeronimo should be happy :P
Better delete it. It´s not about the secret that I won´t have anymore, but the fact that Abuuuuuuuuuuuuusers will have one more thing they can actually do :'(

Re: KaM Remake chat color markup

PostPosted: 17 Apr 2014, 16:20
by Ben
And I can't even edit those chat lines! At least around here, the abuse can be trimmed down on (even if it is by a fellow abuser, himself :D)!

Re: KaM Remake chat color markup

PostPosted: 17 Apr 2014, 16:56
by Krom
We have that info in our wiki as well ;)
https://code.google.com/p/castlesand/wiki/TextColor

Re: KaM Remake chat color markup

PostPosted: 17 Apr 2014, 18:21
by Tiank
Now, when it's on wiki, there's no escape... Chat's gonna be like rainbow...

Re: KaM Remake chat color markup

PostPosted: 18 Apr 2014, 04:15
by Krom
It was on wiki for the whole year now ;)
Still is used only for server names and script texts )

Re: KaM Remake chat color markup

PostPosted: 18 Apr 2014, 13:43
by Lewin
Ah I didn't know it was on the wiki. That's a better place for it really.