Hi,
I have some list of RGB colors given like RGB(255,0,0) or any which i need to convert it in Standar Color number. Please try assist.
Thanks
Printable View
Hi,
I have some list of RGB colors given like RGB(255,0,0) or any which i need to convert it in Standar Color number. Please try assist.
Thanks
You can either use a color mask or just bit shift.
I like bit shifting. Say Red is 170, Green is 100, Blue is 40.
DWORD bitcolor = (red << 16) + (green << 8) + blue;
Thats it, hope this helps.
Regards,
Abadon.