13.03.2014, 06:17
I need the exact code/formula to convert RGB (Red-Green-Blue) to Hex Color Codes (that SA-MP understands) with an example.
Any help would be appreciated.
Any help would be appreciated.
CreateRGB(r, g, b)
{
return ( ((r & 0xff) << 16) + ((g & 0xff) << 8) + (b & 0xff) );
}
printf("%x", CreateRGB(255, 255, 255));