Colors - decimal notation [explanation needed pls]
#1

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.
Reply
#2

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
Reply
#3

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).
Reply
#4

Then what are you talking about? Hexadecimal is the way to make colours in PAWN.
Reply
#5

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);

Reply
#6

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) "
Reply
#7

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.
Reply
#8

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)