Posts: 57
Threads: 26
Joined: Jul 2016
Reputation:
0
My title says every thing. How we can convert rgb to hex.Hex can be in string form.
Posts: 217
Threads: 42
Joined: Aug 2016
Reputation:
0
Use colorpicker.com,or seatch googlr , Integers is used in strings
Posts: 1,208
Threads: 36
Joined: Apr 2015
Quote:
Originally Posted by SickAttack
|
This function does not meet expectations. It is used to extract individual values of Red, Green, Blue, [Alpha]
See
Color Converter
Quote:
Originally Posted by AbyssMorgan
If you want to use color to SendClientMessage:
PHP код:
//Functions:
GetColorRGBA(color); //Return {RGB}
GetColorRGB(color); //Return {RGB}
GetColorARGB(color); //Return {RGB}
//Example:
new text[128];
format(text,sizeof(text),"%s this color is FF6600",GetColorRGBA(0xFF6600FF);
If you need clean conversion:
PHP код:
new hex[12];
format(hex,sizeof(hex),"%06x",ShiftRGBAToRGB(0xFF6600FF)); //hex is "FF6600"
format(hex,sizeof(hex),"%08x",0xFF6600FF); //hex is "FF6600FF"
RGB Include:
https://sampforum.blast.hk/showthread.php?tid=590770
|