如何RGB INT值转换为串色转换为、RGB、INT

2023-09-04 10:16:34 作者:是命i

谁能告诉我如何将3个int的山谷 R,G,B 成串色(十六进制值)在C#

解决方案

  INT红色= 255;
INT绿色= 255;
INT蓝色= 255;

串hexColor =#+ red.ToString(X)+ green.ToString(X)+ blue.ToString(X);
 

Can anyone tell me how to convert three int vales r, g, b into a string color(hexa value) in C#

解决方案 RGB或CMYK值的颜色怎样看是中国建筑标准色卡的哪个色

int red = 255;
int green = 255;
int blue = 255;

string hexColor = "#" + red.ToString("X") + green.ToString("X") + blue.ToString("X");