07.11.2013, 17:04
http://www.javascripter.net/faq/rgbtohex.htm
Play around with the values 0-255 and you can get nice combinations of colours.
Let's say you add: 255 0 0 which is red, it outputs: FF0000
Add 0x before and FF after and you're done!
Let's try another one!
You input: 255 255 0 (yellow) and it gives FFFF00
so it becomes:
You can now continue with your own colours!
Play around with the values 0-255 and you can get nice combinations of colours.
Let's say you add: 255 0 0 which is red, it outputs: FF0000
Add 0x before and FF after and you're done!
pawn Код:
#define RED 0xFF0000FF
You input: 255 255 0 (yellow) and it gives FFFF00
so it becomes:
pawn Код:
#define YELLOW 0xFFFF00FF