saikamesh saikamesh - 1 year ago 218
C# Question

How to convert RGB int values to string color

Can anyone tell me how to convert three int vales

r, g, b
into a string color(hexa value) in C#

Answer Source
int red = 255;
int green = 255;
int blue = 255;

string theHexColor = "#" + red.ToString("X2") + green.ToString("X2") + blue.ToString("X2");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download