internal string HTML_RGBHex(byte R, byte G, byte B) { Object HexR, HexB, HexG = new Object(); //Красный HexR = string.Format("{0:X}", R); if (HexR.ToString().Length < 2) { HexR = "0" + HexR; } //Зеленый HexG = string.Format("{0:X}", G); if (HexG.ToString().Length < 2) { HexG = "0" + HexG; } //Голубой HexB = string.Format("{0:X}", B); if (HexB.ToString().Length < 2) { HexB = "0" + HexB; } return("#" + HexR + HexG + HexB); }
private string HTML_RGBHex(byte R, byte G, byte B) { Object HexR, HexB, HexG = new Object(); //Rojo HexR = string.Format("{0:X}", R); if (HexR.ToString().Length < 2) { HexR = "0" + HexR; } //Verde HexG = string.Format("{0:X}", G); if (HexG.ToString().Length < 2) { HexG = "0" + HexG; } //Azul HexB = string.Format("{0:X}", B); if (HexB.ToString().Length < 2) { HexB = "0" + HexB; } return("#" + HexR + HexG + HexB); }
private string HTML_RGBHex(byte R, byte G, byte B) { object HexR, HexB, HexG = new object(); HexR = string.Format("{0:X}", R); if (HexR.ToString().Length < 2) { HexR = "0" + HexR; } HexB = string.Format("{0:X}", R); if (HexB.ToString().Length < 2) { HexB = "0" + HexR; } HexG = string.Format("{0:X}", R); if (HexG.ToString().Length < 2) { HexG = "0" + HexR; } //return "\"#ff0000\""; //"" + "rgb(201, 76, 76)" + """"; //"rgb(0, 191, 255)"; return("\"#" + HexR + HexG + HexB + "\""); }