SAMP hex color - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SAMP hex color (
/showthread.php?tid=308956)
SAMP hex color -
LiamM - 05.01.2012
Hey guys, I was wondering if someone could help me understand this code a bit more... I'm used to the #FF0000 which would be red... but I do not understand the SAMP way in doing it. I am trying to create a dynamic organisation script and its not working because I can't seem to get the last characters right the (AA)
For example
#FF0000 is red
0xFF0000
But that doesn't make red the way it is... so how can I make it as red as #FF0000 is?
Re: SAMP hex color -
Dodo9655 - 05.01.2012
It's 0xRRGGBBAA, AA being transparency, so red would be 0xFF0000FF, FF being the lowest transparency thus making the text most visible.
Re: SAMP hex color -
Kyosaur - 05.01.2012
The two are completely equivalent, the only difference is that pawn uses the constant symbol "0x" to denote hexadecimal instead of "#" which is already an operator. For more information check out my small article on hexadecimal:
https://sampwiki.blast.hk/wiki/Hex.
Edit: Oh i think i understand what you were asking now, i apologize. See the above post, i apparently thought you were asking something completely different.
Re: SAMP hex color -
LiamM - 06.01.2012
Quote:
Originally Posted by Dodo9655
It's 0xRRGGBBAA, AA being transparency, so red would be 0xFF0000FF, FF being the lowest transparency thus making the text most visible.
|
So for this color
Would I just use FF again to keep it the color it is there?
Edit:
On testing 0xFF0000FF it never came out as red, it came out as a really bright red mainly a pink color, so that didn't work out the way I expected it too...