Colors - decimal notation [explanation needed pls] -
Rainmaker - 15.09.2009
Hi, thx for reading this topic.
Would someone please explain me, how decimal notation of colors in Pawn works ? E.g. how to create RED in decimal notation ?
I really would like to understand it for to be able to script something.
Hope someone will be able to explain it.
Re: Colors - decimal notation [explanation needed pls] -
ilikepie2221 - 15.09.2009
0x[INSERT HERE HEXIDECIMAL COLORS, FOUND
HERE][00-FF to determine the transperancy, FF being 0% transparent, 00 being 100% transparent]
So, for red,
0xFF0000FF
Re: Colors - decimal notation [explanation needed pls] -
Rainmaker - 15.09.2009
I dont care about HEXADECIMAL notation - as subject suggests i ask for explanation of decimal notation lol

. You didnt explain even that HEXDEC one (which I understand of course).
Re: Colors - decimal notation [explanation needed pls] -
KevKo95 - 15.09.2009
Then what are you talking about? Hexadecimal is the way to make colours in PAWN.
Re: Colors - decimal notation [explanation needed pls] -
Rainmaker - 15.09.2009
OMG I ask for help from someone skilled who knows - dont reply if you dont even know what I ask for. PLEASE save me someone. And you check wiki - SetPlayerColor ... ok ?
https://sampwiki.blast.hk/wiki/SetPlayerColor
Quote:
//using decimal notation:
SetPlayerColor(playerid, 4294901930);
|
Re: Colors - decimal notation [explanation needed pls] -
Sergei - 15.09.2009
Wiki explains you completly everything ...
1. Why bother using decimal values if you can simply use HEX?
2. Wiki says: "Hex and decimal values can be converted in each other, e.g. by using Windows' Calculator (advanced interface) "
Re: Colors - decimal notation [explanation needed pls] -
Rainmaker - 15.09.2009
You dont get it - I know how to confert E.G. 255 to FF etc omg thats so simple. I just dont know, how to make a color - one long integer out of value R G B - how to put them together.
Btw why to bother ? Because its gotta by function which will change color of TextDraw and it will go from Green to red - the higher speed is, the more red it is - you get it ? I cant do it by HEXcol.
Re: Colors - decimal notation [explanation needed pls] -
cyber_punk - 15.09.2009
I don't get what you need to know 0 is dark, 255 is light. As you already said its R G B. Are you sure you are reshowing the Textdraw after applying the color? Otherwise your changes won't be seen till its redrawn.
[Edit]
Red (well a crimson rather good for a speedo) = rgb(220, 20, 60)
Yellow = rgb(238, 238, 0)
Green = rgb(131, 245, 44)
Never go to 255 across all colors that's white, even going to say 250 tends to be a washed out color.