How to convert HEX to SAMP color ?
#1

Get a Hex Color from here:

http://caribbean-joe.net/joe/Noteboo...hex_colors.jpg

Example RED in hex:
Код:
FF0000
Add this in the begging :
Код:
0x
It will stay like this:
Код:
0xFF0000
Then repeat the two last characters:
Код:
0xFF00-00-00
And you will have a SAMP color from an HEX color:
Код:
0xFF000000
Conclusion: 0x + HEX COLOR + HEX COLOR LAST TWO CHARACTERS !

Cheers
Reply
#2

hmm.. not rly..

the 2 last chars is for the bright i think. Correct me if i wrong.
Reply
#3

As you can see on the HEX COLORS table:

This is a flash red:
Код:
FF0000
This is a flash +orange red ( + brightness ):
Код:
FF1100
So the "Brightness" is here:
Код:
FF-00-00

Reply
#4

Quote:
Originally Posted by RaFsTar
Then repeat the two last characters:
Код:
0xFF00-00-00
Kevin is right, this is wrong.

The last 2 characters are the Alpha channel, and they determine how opaque/transparent the colour will be. Setting them to 00 will make it transparent. Setting them to FF makes it opaque.
Reply
#5

Dude i just gave a way to convert the HEX COLORS to SAMP COLORS, if you think that's wrong on the SAMP COLORS, just try making that with one color !
Reply
#6

"Dude", I've been using SA-MP colours for quite a while now, you don't copy the Blue hexadecimal value for the Alpha channel, that's just silly.

0xRRGGBBAA - Correct

0xRRGGBBBB - Incorrect
Reply
#7

Ok this topic sucks, delete it !
Reply
#8

Or you can just use the hex to pawn color converter i made (in my signature)
Reply
#9

yeah xD !

Sorry for my mistake, i thought it was adding the last characters !

Best Regards !
Reply
#10

so anyone have the converter?

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)