covert rgb to hex?
#1

My title says every thing. How we can convert rgb to hex.Hex can be in string form.
Reply
#2

Use colorpicker.com,or seatch googlr , Integers is used in strings
Reply
#3

https://sampforum.blast.hk/showthread.php?tid=590770

RGBToHex(color,&red,&green,&blue);
Reply
#4

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=590770

RGBToHex(color,&red,&green,&blue);
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
Reply
#5

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)