29 static Bool_t& TColor__GrayScaleMode() {
30 static Bool_t grayScaleMode;
33 static TArrayI& TColor__Palette() {
34 static TArrayI globalPalette(0);
37 static TArrayD& TColor__PalettesList() {
38 static TArrayD globalPalettesList(0);
39 return globalPalettesList;
48 #define fgGrayscaleMode TColor__GrayScaleMode() 49 #define fgPalette TColor__Palette() 50 #define fgPalettesList TColor__PalettesList() 977 fRed = fGreen = fBlue = fHue = fLight = fSaturation = -1;
993 Warning(
"TColor",
"color %d already defined", color);
1010 if (!name || !*name) {
1011 snprintf(aname,32,
"Color%d", color);
1038 RGBtoHLS(
r,
g,
b, fHue, fLight, fSaturation);
1072 if (initDone)
return;
1075 if (
gROOT->GetListOfColors()->First() == 0) {
1079 new TColor(2,1,0,0,
"red");
1080 new TColor(3,0,1,0,
"green");
1081 new TColor(4,0,0,1,
"blue");
1082 new TColor(5,1,1,0,
"yellow");
1083 new TColor(6,1,0,1,
"magenta");
1084 new TColor(7,0,1,1,
"cyan");
1085 new TColor(10,0.999,0.999,0.999,
"white");
1086 new TColor(11,0.754,0.715,0.676,
"editcol");
1092 if (c110) c110->
SetRGB(0.999,0.999,.999);
1095 new TColor(20,0.8,0.78,0.67);
1096 new TColor(31,0.54,0.66,0.63);
1097 new TColor(41,0.83,0.81,0.53);
1098 new TColor(30,0.52,0.76,0.64);
1099 new TColor(32,0.51,0.62,0.55);
1100 new TColor(24,0.70,0.65,0.59);
1101 new TColor(21,0.8,0.78,0.67);
1102 new TColor(47,0.67,0.56,0.58);
1103 new TColor(35,0.46,0.54,0.57);
1104 new TColor(33,0.68,0.74,0.78);
1105 new TColor(39,0.5,0.5,0.61);
1106 new TColor(37,0.43,0.48,0.52);
1107 new TColor(38,0.49,0.6,0.82);
1108 new TColor(36,0.41,0.51,0.59);
1109 new TColor(49,0.58,0.41,0.44);
1110 new TColor(43,0.74,0.62,0.51);
1111 new TColor(22,0.76,0.75,0.66);
1112 new TColor(45,0.75,0.51,0.47);
1113 new TColor(44,0.78,0.6,0.49);
1114 new TColor(26,0.68,0.6,0.55);
1115 new TColor(28,0.53,0.4,0.34);
1116 new TColor(25,0.72,0.64,0.61);
1117 new TColor(27,0.61,0.56,0.51);
1118 new TColor(23,0.73,0.71,0.64);
1119 new TColor(42,0.87,0.73,0.53);
1120 new TColor(46,0.81,0.37,0.38);
1121 new TColor(48,0.65,0.47,0.48);
1122 new TColor(34,0.48,0.56,0.6);
1123 new TColor(40,0.67,0.65,0.75);
1124 new TColor(29,0.69,0.81,0.78);
1127 new TColor(8, 0.35,0.83,0.33);
1128 new TColor(9, 0.35,0.33,0.85);
1129 new TColor(12,.3,.3,.3,
"grey12");
1130 new TColor(13,.4,.4,.4,
"grey13");
1131 new TColor(14,.5,.5,.5,
"grey14");
1132 new TColor(15,.6,.6,.6,
"grey15");
1133 new TColor(16,.7,.7,.7,
"grey16");
1134 new TColor(17,.8,.8,.8,
"grey17");
1135 new TColor(18,.9,.9,.9,
"grey18");
1136 new TColor(19,.95,.95,.95,
"grey19");
1137 new TColor(50, 0.83,0.35,0.33);
1150 Int_t maxPretty = 50;
1154 for (i=0 ; i<maxPretty-1 ; i++) {
1155 hue = maxHue-(i+1)*((maxHue-minHue)/maxPretty);
1162 for (i = 1; i < 8; i++) {
1163 s0 =
gROOT->GetColor(i);
1165 if (i == 1) { r = 0.6;
g = 0.6;
b = 0.6; }
1166 if (r == 1) r = 0.9;
else if (r == 0) r = 0.1;
1167 if (
g == 1)
g = 0.9;
else if (
g == 0)
g = 0.1;
1168 if (
b == 1)
b = 0.9;
else if (
b == 0)
b = 0.1;
1205 tempbuf.
Form(
"#%02x%02x%02x%02x", a, r, g, b);
1207 tempbuf.
Form(
"#%02x%02x%02x", r, g, b);
1251 Int_t colorn = offset+
n-10;
1254 color =
new TColor(colorn,rgb[3*n]/255.,rgb[3*n+1]/255.,rgb[3*n+2]/255.);
1256 if (n>10) colorname.
Form(
"%s+%d",name,n-10);
1257 else if (n<10) colorname.
Form(
"%s-%d",name,10-n);
1258 else colorname.
Form(
"%s",name);
1271 Int_t colorn = offset+
n-9;
1274 color =
new TColor(colorn,rgb[3*n]/255.,rgb[3*n+1]/255.,rgb[3*n+2]/255.);
1276 if (n>9) colorname.
Form(
"%s+%d",name,n-9);
1277 else if (n<9) colorname.
Form(
"%s-%d",name,9-n);
1278 else colorname.
Form(
"%s",name);
1290 ,255,153,255, 204,153,204
1291 ,255,102,255, 204,102,204, 153,102,153
1292 ,255, 51,255, 204, 51,204, 153, 51,153, 102, 51,102
1293 ,255, 0,255, 204, 0,204, 153, 0,153, 102, 0,102, 51, 0, 51};
1295 UChar_t red[46] = {255,204,204
1296 ,255,153,153, 204,153,153
1297 ,255,102,102, 204,102,102, 153,102,102
1298 ,255, 51, 51, 204, 51, 51, 153, 51, 51, 102, 51, 51
1299 ,255, 0, 0, 204, 0, 0, 153, 0, 0, 102, 0, 0, 51, 0, 0};
1301 UChar_t yellow[46] = {255,255,204
1302 ,255,255,153, 204,204,153
1303 ,255,255,102, 204,204,102, 153,153,102
1304 ,255,255, 51, 204,204, 51, 153,153, 51, 102,102, 51
1305 ,255,255, 0, 204,204, 0, 153,153, 0, 102,102, 0, 51, 51, 0};
1307 UChar_t green[46] = {204,255,204
1308 ,153,255,153, 153,204,153
1309 ,102,255,102, 102,204,102, 102,153,102
1310 , 51,255, 51, 51,204, 51, 51,153, 51, 51,102, 51
1311 , 0,255, 0, 0,204, 0, 0,153, 0, 0,102, 0, 0, 51, 0};
1313 UChar_t cyan[46] = {204,255,255
1314 ,153,255,255, 153,204,204
1315 ,102,255,255, 102,204,204, 102,153,153
1316 , 51,255,255, 51,204,204, 51,153,153, 51,102,102
1317 , 0,255,255, 0,204,204, 0,153,153, 0,102,102, 0, 51, 51};
1319 UChar_t blue[46] = {204,204,255
1320 ,153,153,255, 153,153,204
1321 ,102,102,255, 102,102,204, 102,102,153
1322 , 51, 51,255, 51, 51,204, 51, 51,153, 51, 51,102
1323 , 0, 0,255, 0, 0,204, 0, 0,153, 0, 0,102, 0, 0, 51};
1325 UChar_t pink[60] = {255, 51,153, 204, 0,102, 102, 0, 51, 153, 0, 51, 204, 51,102
1326 ,255,102,153, 255, 0,102, 255, 51,102, 204, 0, 51, 255, 0, 51
1327 ,255,153,204, 204,102,153, 153, 51,102, 153, 0,102, 204, 51,153
1328 ,255,102,204, 255, 0,153, 204, 0,153, 255, 51,204, 255, 0,153};
1330 UChar_t orange[60]={255,204,153, 204,153,102, 153,102, 51, 153,102, 0, 204,153, 51
1331 ,255,204,102, 255,153, 0, 255,204, 51, 204,153, 0, 255,204, 0
1332 ,255,153, 51, 204,102, 0, 102, 51, 0, 153, 51, 0, 204,102, 51
1333 ,255,153,102, 255,102, 0, 255,102, 51, 204, 51, 0, 255, 51, 0};
1335 UChar_t spring[60]={153,255, 51, 102,204, 0, 51,102, 0, 51,153, 0, 102,204, 51
1336 ,153,255,102, 102,255, 0, 102,255, 51, 51,204, 0, 51,255, 0
1337 ,204,255,153, 153,204,102, 102,153, 51, 102,153, 0, 153,204, 51
1338 ,204,255,102, 153,255, 0, 204,255, 51, 153,204, 0, 204,255, 0};
1340 UChar_t teal[60] = {153,255,204, 102,204,153, 51,153,102, 0,153,102, 51,204,153
1341 ,102,255,204, 0,255,102, 51,255,204, 0,204,153, 0,255,204
1342 , 51,255,153, 0,204,102, 0,102, 51, 0,153, 51, 51,204,102
1343 ,102,255,153, 0,255,153, 51,255,102, 0,204, 51, 0,255, 51};
1345 UChar_t azure[60] ={153,204,255, 102,153,204, 51,102,153, 0, 51,153, 51,102,204
1346 ,102,153,255, 0,102,255, 51,102,255, 0, 51,204, 0, 51,255
1347 , 51,153,255, 0,102,204, 0, 51,102, 0,102,153, 51,153,204
1348 ,102,204,255, 0,153,255, 51,204,255, 0,153,204, 0,204,255};
1350 UChar_t violet[60]={204,153,255, 153,102,204, 102, 51,153, 102, 0,153, 153, 51,204
1351 ,204,102,255, 153, 0,255, 204, 51,255, 153, 0,204, 204, 0,255
1352 ,153, 51,255, 102, 0,204, 51, 0,102, 51, 0,153, 102, 51,204
1353 ,153,102,255, 102, 0,255, 102, 51,255, 51, 0,204, 51, 0,255};
1378 if (ncolors == 0)
return 0;
1379 Int_t icol = i%ncolors;
1380 if (icol < 0) icol = 0;
1442 if (hue > 0) { rh = hue;
if (rh > 360) rh = 360; }
1443 if (light > 0) { rl = light;
if (rl > 1) rl = 1; }
1444 if (satur > 0) { rs = satur;
if (rs > 1) rs = 1; }
1447 rm2 = rl*(1.0 + rs);
1449 rm2 = rl + rs - rl*rs;
1452 if (!rs) { r = rl; g = rl; b = rl;
return; }
1464 if (hue > 360) hue = hue - 360;
1465 if (hue < 0) hue = hue + 360;
1466 if (hue < 60 )
return rn1 + (rn2-rn1)*hue/60;
1467 if (hue < 180)
return rn2;
1468 if (hue < 240)
return rn1 + (rn2-rn1)*(240-hue)/60;
1486 r = (
Int_t) (rr * 255);
1487 g = (
Int_t) (gg * 255);
1488 b = (
Int_t) (bb * 255);
1517 p = value*(1-satur);
1518 q = value*(1-satur*f );
1519 t = value*(1-satur*(1-f));
1560 printf(
"Color:%d Red=%f Green=%f Blue=%f Alpha=%f Name=%s\n",
1579 Float_t rnorm, gnorm, bnorm, minval, maxval, msum, mdiff,
r,
g,
b;
1580 minval = maxval =0 ;
1582 if (rr > 0) { r = rr;
if (r > 1) r = 1; }
1583 if (gg > 0) { g = gg;
if (g > 1) g = 1; }
1584 if (bb > 0) { b = bb;
if (b > 1) b = 1; }
1587 if (g < minval) minval =
g;
1588 if (b < minval) minval =
b;
1590 if (g > maxval) maxval =
g;
1591 if (b > maxval) maxval =
b;
1593 rnorm = gnorm = bnorm = 0;
1594 mdiff = maxval - minval;
1595 msum = maxval + minval;
1597 if (maxval != minval) {
1598 rnorm = (maxval -
r)/mdiff;
1599 gnorm = (maxval -
g)/mdiff;
1600 bnorm = (maxval -
b)/mdiff;
1609 satur = mdiff/(2.0 - msum);
1612 hue = 60.0 * (6.0 + bnorm - gnorm);
1613 else if (g == maxval)
1614 hue = 60.0 * (2.0 + rnorm - bnorm);
1616 hue = 60.0 * (4.0 + gnorm - rnorm);
1655 }
else if (g == max) {
1656 hue = 2+(b-
r)/delta;
1658 hue = 4+(r-
g)/delta;
1662 if (hue < 0) hue += 360;
1679 h = (
Int_t) (hue/360 * 255);
1680 l = (
Int_t) (light * 255);
1681 s = (
Int_t) (satur * 255);
1694 if (
fRed < 0)
return;
1700 if (nplanes == 0) nplanes = 16;
1711 Float_t dr, dg, db, lr, lg, lb;
1717 if (nplanes > 8) dark->
SetRGB(dr, dg, db);
1718 else dark->
SetRGB(0.3,0.3,0.3);
1725 if (nplanes > 8) light->
SetRGB(lr, lg, lb);
1726 else light->
SetRGB(0.8,0.8,0.8);
1751 if (hexcolor && *hexcolor ==
'#') {
1753 if (sscanf(hexcolor+1,
"%02x%02x%02x", &r, &g, &b) == 3)
1756 ::Error(
"TColor::GetColor(const char*)",
"incorrect color string");
1771 rr =
Int_t(r * 255);
1772 gg =
Int_t(g * 255);
1773 bb =
Int_t(b * 255);
1834 if (r > 255) r = 255;
1835 if (g > 255) g = 255;
1836 if (b > 255) b = 255;
1862 if (nplanes >= 24) thres = 1.0/255.0;
1866 while ((color = (
TColor*)next())) {
1878 Form(
"#%02x%02x%02x", r, g, b));
1890 if (n < 0)
return -1;
1897 if (n < ncolors) color = (
TColor*)colors->
At(n);
1898 if (!color)
return -1;
1907 if (nb < ncolors) colorb = (
TColor*)colors->
At(nb);
1908 if (colorb)
return nb;
1909 colorb =
new TColor(nb,r,g,b);
1922 if (n < 0)
return -1;
1929 if (n < ncolors) color = (
TColor*)colors->
At(n);
1930 if (!color)
return -1;
1939 if (nd < ncolors) colord = (
TColor*)colors->
At(nd);
1940 if (colord)
return nd;
1941 colord =
new TColor(nd,r,g,b);
1953 if (n < 0)
return -1;
1963 ::Error(
"TColor::GetColorTransparent",
"color with index %d not defined", n);
1995 ::Warning(
"TColor::Number2Pixel",
"color with index %d not defined", ci);
2031 if (r > 255) r = 255;
2032 if (g > 255) g = 255;
2033 if (b > 255) b = 255;
2069 r = color.
fRed / 257;
2071 b = color.
fBlue / 257;
2086 tempbuf.
Form(
"#%02x%02x%02x", r, g, b);
2112 out <<
" Int_t ci; // for color index setting" << std::endl;
2113 out <<
" TColor *color; // for color definition with alpha" << std::endl;
2117 out<<
" ci = "<<ci<<
";"<<std::endl;
2118 out<<
" color = new TColor(ci, "<<r<<
", "<<g<<
", "<<b<<
", " 2119 <<
"\" \", "<<a<<
");"<<std::endl;
2121 ri = (
Int_t)(255*r);
2122 gi = (
Int_t)(255*g);
2123 bi = (
Int_t)(255*b);
2124 cname.
Form(
"#%02x%02x%02x", ri, gi, bi);
2125 out<<
" ci = TColor::GetColor("<<quote<<cname.
Data()<<quote<<
");"<<std::endl;
2150 while ((color = (
TColor*) iColor()))
2211 if(Number < 2 || NColors < 1){
2218 for (c = 0; c < Number; c++) {
2219 if (Red[c] < 0 || Red[c] > 1.0 ||
2220 Green[c] < 0 || Green[c] > 1.0 ||
2221 Blue[c] < 0 || Blue[c] > 1.0 ||
2222 Stops[c] < 0 || Stops[c] > 1.0) {
2227 if (Stops[c-1] > Stops[c]) {
2237 for (g = 1; g < Number; g++) {
2239 nColorsGradient = (
Int_t) (
floor(NColors*Stops[g]) -
floor(NColors*Stops[g-1]));
2240 for (c = 0; c < nColorsGradient; c++) {
2241 new TColor(
Float_t(Red[g-1] + c * (Red[g] - Red[g-1]) / nColorsGradient),
2242 Float_t(Green[g-1] + c * (Green[g] - Green[g-1])/ nColorsGradient),
2243 Float_t(Blue[g-1] + c * (Blue[g] - Blue[g-1]) / nColorsGradient),
2392 static Int_t paletteType = 0;
2394 Int_t palette[50] = {19,18,17,16,15,14,13,12,11,20,
2395 21,22,23,24,25,26,27,28,29,30, 8,
2396 31,32,33,34,35,36,37,38,39,40, 9,
2397 41,42,43,44,45,47,48,49,46,50, 2,
2398 7, 6, 5, 4, 3, 2,1};
2404 for (i=0;i<ncolors;i++)
fgPalette.fArray[i] = palette[i];
2410 if (ncolors == 1 && colors == 0) {
2413 for (i=0;i<ncolors-1;i++)
fgPalette.fArray[i] = 51+i;
2420 if (colors == 0 && ncolors>50) {
2429 if (paletteType == ncolors && same_alpha)
return;
2431 for (i=0;i<255;i++)
fgPalette.fArray[i] = Idx+i;
2432 paletteType = ncolors;
2435 if (alphas>0 && !same_alpha) {
2437 for (i=0;i<255;i++) {
2438 ca =
gROOT->GetColor(Idx+i);
2447 Double_t stops[9] = { 0.0000, 0.1250, 0.2500, 0.3750, 0.5000, 0.6250, 0.7500, 0.8750, 1.0000};
2453 Double_t red[9] = { 0./255., 9./255., 13./255., 17./255., 24./255., 32./255., 27./255., 25./255., 29./255.};
2454 Double_t green[9] = { 0./255., 0./255., 0./255., 2./255., 37./255., 74./255., 113./255., 160./255., 221./255.};
2455 Double_t blue[9] = { 28./255., 42./255., 59./255., 78./255., 98./255., 129./255., 154./255., 184./255., 221./255.};
2463 Double_t red[9] = { 0./255., 32./255., 64./255., 96./255., 128./255., 160./255., 192./255., 224./255., 255./255.};
2464 Double_t green[9] = { 0./255., 32./255., 64./255., 96./255., 128./255., 160./255., 192./255., 224./255., 255./255.};
2465 Double_t blue[9] = { 0./255., 32./255., 64./255., 96./255., 128./255., 160./255., 192./255., 224./255., 255./255.};
2473 Double_t red[9] = { 0./255., 45./255., 99./255., 156./255., 212./255., 230./255., 237./255., 234./255., 242./255.};
2474 Double_t green[9] = { 0./255., 0./255., 0./255., 45./255., 101./255., 168./255., 238./255., 238./255., 243./255.};
2475 Double_t blue[9] = { 0./255., 1./255., 1./255., 3./255., 9./255., 8./255., 11./255., 95./255., 230./255.};
2483 Double_t red[9] = { 0./255., 22./255., 44./255., 68./255., 93./255., 124./255., 160./255., 192./255., 237./255.};
2484 Double_t green[9] = { 0./255., 16./255., 41./255., 67./255., 93./255., 125./255., 162./255., 194./255., 241./255.};
2485 Double_t blue[9] = { 97./255., 100./255., 99./255., 99./255., 93./255., 68./255., 44./255., 26./255., 74./255.};
2493 Double_t red[9] = { 0./255., 5./255., 15./255., 35./255., 102./255., 196./255., 208./255., 199./255., 110./255.};
2494 Double_t green[9] = { 0./255., 48./255., 124./255., 192./255., 206./255., 226./255., 97./255., 16./255., 0./255.};
2495 Double_t blue[9] = { 99./255., 142./255., 198./255., 201./255., 90./255., 22./255., 13./255., 8./255., 2./255.};
2503 Double_t red[9] = { 242./255., 234./255., 237./255., 230./255., 212./255., 156./255., 99./255., 45./255., 0./255.};
2504 Double_t green[9] = { 243./255., 238./255., 238./255., 168./255., 101./255., 45./255., 0./255., 0./255., 0./255.};
2505 Double_t blue[9] = { 230./255., 95./255., 11./255., 8./255., 9./255., 3./255., 1./255., 1./255., 0./255.};
2513 Double_t red[9] = { 0.2082, 0.0592, 0.0780, 0.0232, 0.1802, 0.5301, 0.8186, 0.9956, 0.9764};
2514 Double_t green[9] = { 0.1664, 0.3599, 0.5041, 0.6419, 0.7178, 0.7492, 0.7328, 0.7862, 0.9832};
2515 Double_t blue[9] = { 0.5293, 0.8684, 0.8385, 0.7914, 0.6425, 0.4662, 0.3499, 0.1968, 0.0539};
2523 Double_t red[9] = { 0.0000, 0.0956, 0.0098, 0.2124, 0.6905, 0.9242, 0.7914, 0.7596, 1.0000};
2524 Double_t green[9] = { 0.0000, 0.1147, 0.3616, 0.5041, 0.4577, 0.4691, 0.6905, 0.9237, 1.0000};
2525 Double_t blue[9] = { 0.0000, 0.2669, 0.3121, 0.1318, 0.2236, 0.6741, 0.9882, 0.9593, 1.0000};
2533 Double_t red[9] = {13./255., 23./255., 25./255., 63./255., 76./255., 104./255., 137./255., 161./255., 206./255.};
2534 Double_t green[9] = {95./255., 67./255., 37./255., 21./255., 0./255., 12./255., 35./255., 52./255., 79./255.};
2535 Double_t blue[9] = { 4./255., 3./255., 2./255., 6./255., 11./255., 22./255., 49./255., 98./255., 208./255.};
2543 Double_t red[9] = {0./255., 61./255., 89./255., 122./255., 143./255., 160./255., 185./255., 204./255., 231./255.};
2544 Double_t green[9] = {0./255., 0./255., 0./255., 0./255., 14./255., 37./255., 72./255., 132./255., 235./255.};
2545 Double_t blue[9] = {0./255., 140./255., 224./255., 144./255., 4./255., 5./255., 6./255., 9./255., 13./255.};
2553 Double_t red[9] = { 14./255., 7./255., 2./255., 0./255., 5./255., 11./255., 55./255., 131./255., 229./255.};
2554 Double_t green[9] = {105./255., 56./255., 26./255., 1./255., 42./255., 74./255., 131./255., 171./255., 229./255.};
2555 Double_t blue[9] = { 2./255., 21./255., 35./255., 60./255., 92./255., 113./255., 160./255., 185./255., 229./255.};
2563 Double_t red[9] = { 0./255., 0./255., 0./255., 70./255., 148./255., 231./255., 235./255., 237./255., 244./255.};
2564 Double_t green[9] = { 0./255., 0./255., 0./255., 0./255., 0./255., 69./255., 67./255., 216./255., 244./255.};
2565 Double_t blue[9] = { 0./255., 102./255., 228./255., 231./255., 177./255., 124./255., 137./255., 20./255., 244./255.};
2573 Double_t red[9] = { 50./255., 56./255., 63./255., 68./255., 93./255., 121./255., 165./255., 192./255., 241./255.};
2574 Double_t green[9] = { 66./255., 81./255., 91./255., 96./255., 111./255., 128./255., 155./255., 189./255., 241./255.};
2575 Double_t blue[9] = { 97./255., 91./255., 75./255., 65./255., 77./255., 103./255., 143./255., 167./255., 217./255.};
2583 Double_t red[9] = { 145./255., 166./255., 167./255., 156./255., 131./255., 114./255., 101./255., 112./255., 132./255.};
2584 Double_t green[9] = { 158./255., 178./255., 179./255., 181./255., 163./255., 154./255., 144./255., 152./255., 159./255.};
2585 Double_t blue[9] = { 190./255., 199./255., 201./255., 192./255., 176./255., 169./255., 160./255., 166./255., 190./255.};
2593 Double_t red[9] = { 93./255., 91./255., 99./255., 108./255., 130./255., 125./255., 132./255., 155./255., 174./255.};
2594 Double_t green[9] = { 126./255., 124./255., 128./255., 129./255., 131./255., 121./255., 119./255., 153./255., 173./255.};
2595 Double_t blue[9] = { 103./255., 94./255., 87./255., 85./255., 80./255., 85./255., 107./255., 120./255., 146./255.};
2603 Double_t red[9] = { 24./255., 40./255., 69./255., 90./255., 104./255., 114./255., 120./255., 132./255., 103./255.};
2604 Double_t green[9] = { 29./255., 52./255., 94./255., 127./255., 150./255., 162./255., 159./255., 151./255., 101./255.};
2605 Double_t blue[9] = { 29./255., 52./255., 96./255., 132./255., 162./255., 181./255., 184./255., 186./255., 131./255.};
2613 Double_t red[9] = { 46./255., 38./255., 61./255., 92./255., 113./255., 121./255., 132./255., 150./255., 191./255.};
2614 Double_t green[9] = { 46./255., 36./255., 40./255., 69./255., 110./255., 135./255., 131./255., 92./255., 34./255.};
2615 Double_t blue[9] = { 46./255., 80./255., 74./255., 70./255., 81./255., 105./255., 165./255., 211./255., 225./255.};
2623 Double_t red[9] = { 0./255., 4./255., 12./255., 30./255., 52./255., 101./255., 142./255., 190./255., 237./255.};
2624 Double_t green[9] = { 0./255., 40./255., 86./255., 121./255., 140./255., 172./255., 187./255., 213./255., 240./255.};
2625 Double_t blue[9] = { 0./255., 9./255., 14./255., 18./255., 21./255., 23./255., 27./255., 35./255., 101./255.};
2633 Double_t red[9] = { 198./255., 206./255., 206./255., 211./255., 198./255., 181./255., 161./255., 171./255., 244./255.};
2634 Double_t green[9] = { 103./255., 133./255., 150./255., 172./255., 178./255., 174./255., 163./255., 175./255., 244./255.};
2635 Double_t blue[9] = { 49./255., 54./255., 55./255., 66./255., 91./255., 130./255., 184./255., 224./255., 244./255.};
2643 Double_t red[9] = { 243./255., 243./255., 240./255., 240./255., 241./255., 239./255., 186./255., 151./255., 129./255.};
2644 Double_t green[9] = { 0./255., 46./255., 99./255., 149./255., 194./255., 220./255., 183./255., 166./255., 147./255.};
2645 Double_t blue[9] = { 6./255., 8./255., 36./255., 91./255., 169./255., 235./255., 246./255., 240./255., 233./255.};
2653 Double_t red[9] = { 22./255., 19./255., 19./255., 25./255., 35./255., 53./255., 88./255., 139./255., 210./255.};
2654 Double_t green[9] = { 0./255., 32./255., 69./255., 108./255., 135./255., 159./255., 183./255., 198./255., 215./255.};
2655 Double_t blue[9] = { 77./255., 96./255., 110./255., 116./255., 110./255., 100./255., 90./255., 78./255., 70./255.};
2663 Double_t red[9] = { 68./255., 116./255., 165./255., 182./255., 189./255., 180./255., 145./255., 111./255., 71./255.};
2664 Double_t green[9] = { 37./255., 82./255., 135./255., 178./255., 204./255., 225./255., 221./255., 202./255., 147./255.};
2665 Double_t blue[9] = { 16./255., 55./255., 105./255., 147./255., 196./255., 226./255., 232./255., 224./255., 178./255.};
2673 Double_t red[9] = { 61./255., 99./255., 136./255., 181./255., 213./255., 225./255., 198./255., 136./255., 24./255.};
2674 Double_t green[9] = { 149./255., 140./255., 96./255., 83./255., 132./255., 178./255., 190./255., 135./255., 22./255.};
2675 Double_t blue[9] = { 214./255., 203./255., 168./255., 135./255., 110./255., 100./255., 111./255., 113./255., 22./255.};
2683 Double_t red[9] = { 76./255., 120./255., 156./255., 183./255., 197./255., 180./255., 162./255., 154./255., 140./255.};
2684 Double_t green[9] = { 34./255., 35./255., 42./255., 69./255., 102./255., 137./255., 164./255., 188./255., 197./255.};
2685 Double_t blue[9] = { 64./255., 69./255., 78./255., 105./255., 142./255., 177./255., 205./255., 217./255., 198./255.};
2693 Double_t red[9] = { 37./255., 102./255., 157./255., 188./255., 196./255., 214./255., 223./255., 235./255., 251./255.};
2694 Double_t green[9] = { 37./255., 29./255., 25./255., 37./255., 67./255., 91./255., 132./255., 185./255., 251./255.};
2695 Double_t blue[9] = { 37./255., 32./255., 33./255., 45./255., 66./255., 98./255., 137./255., 187./255., 251./255.};
2703 Double_t red[9] = { 79./255., 100./255., 119./255., 137./255., 153./255., 172./255., 192./255., 205./255., 250./255.};
2704 Double_t green[9] = { 63./255., 79./255., 93./255., 103./255., 115./255., 135./255., 167./255., 196./255., 250./255.};
2705 Double_t blue[9] = { 51./255., 59./255., 66./255., 61./255., 62./255., 70./255., 110./255., 160./255., 250./255.};
2713 Double_t red[9] = { 43./255., 44./255., 50./255., 66./255., 125./255., 172./255., 178./255., 155./255., 157./255.};
2714 Double_t green[9] = { 63./255., 63./255., 85./255., 101./255., 138./255., 163./255., 122./255., 51./255., 39./255.};
2715 Double_t blue[9] = { 121./255., 101./255., 58./255., 44./255., 47./255., 55./255., 57./255., 44./255., 43./255.};
2723 Double_t red[9] = { 0./255., 41./255., 62./255., 79./255., 90./255., 87./255., 99./255., 140./255., 228./255.};
2724 Double_t green[9] = { 0./255., 57./255., 81./255., 93./255., 85./255., 70./255., 71./255., 125./255., 228./255.};
2725 Double_t blue[9] = { 95./255., 91./255., 91./255., 82./255., 60./255., 43./255., 44./255., 112./255., 228./255.};
2733 Double_t red[9] = { 49./255., 59./255., 72./255., 88./255., 114./255., 141./255., 176./255., 205./255., 222./255.};
2734 Double_t green[9] = { 78./255., 72./255., 66./255., 57./255., 59./255., 75./255., 106./255., 142./255., 173./255.};
2735 Double_t blue[9] = { 78./255., 55./255., 46./255., 40./255., 39./255., 39./255., 40./255., 41./255., 47./255.};
2743 Double_t red[9] = { 243./255., 222./255., 201./255., 185./255., 165./255., 158./255., 166./255., 187./255., 219./255.};
2744 Double_t green[9] = { 94./255., 108./255., 132./255., 135./255., 125./255., 96./255., 68./255., 51./255., 61./255.};
2745 Double_t blue[9] = { 7./255., 9./255., 12./255., 19./255., 45./255., 89./255., 118./255., 146./255., 118./255.};
2753 Double_t red[9] = { 19./255., 44./255., 74./255., 105./255., 137./255., 166./255., 194./255., 206./255., 220./255.};
2754 Double_t green[9] = { 19./255., 28./255., 40./255., 55./255., 82./255., 110./255., 159./255., 181./255., 220./255.};
2755 Double_t blue[9] = { 19./255., 42./255., 68./255., 96./255., 129./255., 157./255., 188./255., 203./255., 220./255.};
2763 Double_t red[9] = { 33./255., 44./255., 70./255., 99./255., 140./255., 165./255., 199./255., 211./255., 216./255.};
2764 Double_t green[9] = { 38./255., 50./255., 76./255., 105./255., 140./255., 165./255., 191./255., 189./255., 167./255.};
2765 Double_t blue[9] = { 55./255., 67./255., 97./255., 124./255., 140./255., 166./255., 163./255., 129./255., 52./255.};
2773 Double_t red[9] = { 0./255., 33./255., 73./255., 124./255., 136./255., 152./255., 159./255., 171./255., 223./255.};
2774 Double_t green[9] = { 0./255., 43./255., 92./255., 124./255., 134./255., 126./255., 121./255., 144./255., 223./255.};
2775 Double_t blue[9] = { 0./255., 43./255., 68./255., 76./255., 73./255., 64./255., 72./255., 114./255., 223./255.};
2783 Double_t red[9] = { 5./255., 18./255., 45./255., 124./255., 193./255., 223./255., 205./255., 128./255., 49./255.};
2784 Double_t green[9] = { 48./255., 134./255., 207./255., 230./255., 193./255., 113./255., 28./255., 0./255., 7./255.};
2785 Double_t blue[9] = { 6./255., 15./255., 41./255., 121./255., 193./255., 226./255., 208./255., 130./255., 49./255.};
2793 Double_t red[9] = { 180./255., 106./255., 104./255., 135./255., 164./255., 188./255., 189./255., 165./255., 144./255.};
2794 Double_t green[9] = { 72./255., 126./255., 154./255., 184./255., 198./255., 207./255., 205./255., 190./255., 179./255.};
2795 Double_t blue[9] = { 41./255., 120./255., 158./255., 188./255., 194./255., 181./255., 145./255., 100./255., 62./255.};
2803 Double_t red[9] = { 57./255., 72./255., 94./255., 117./255., 136./255., 154./255., 174./255., 192./255., 215./255.};
2804 Double_t green[9] = { 0./255., 33./255., 68./255., 109./255., 140./255., 171./255., 192./255., 196./255., 209./255.};
2805 Double_t blue[9] = { 116./255., 137./255., 173./255., 201./255., 200./255., 201./255., 203./255., 190./255., 187./255.};
2813 Double_t red[9] = { 31./255., 71./255., 123./255., 160./255., 210./255., 222./255., 214./255., 199./255., 183./255.};
2814 Double_t green[9] = { 40./255., 117./255., 171./255., 211./255., 231./255., 220./255., 190./255., 132./255., 65./255.};
2815 Double_t blue[9] = { 234./255., 214./255., 228./255., 222./255., 210./255., 160./255., 105./255., 60./255., 34./255.};
2823 Double_t red[9] = { 123./255., 108./255., 109./255., 126./255., 154./255., 172./255., 188./255., 196./255., 218./255.};
2824 Double_t green[9] = { 184./255., 138./255., 130./255., 133./255., 154./255., 175./255., 188./255., 196./255., 218./255.};
2825 Double_t blue[9] = { 208./255., 130./255., 109./255., 99./255., 110./255., 122./255., 150./255., 171./255., 218./255.};
2833 Double_t red[9] = { 105./255., 106./255., 122./255., 143./255., 159./255., 172./255., 176./255., 181./255., 207./255.};
2834 Double_t green[9] = { 252./255., 197./255., 194./255., 187./255., 174./255., 162./255., 153./255., 136./255., 125./255.};
2835 Double_t blue[9] = { 146./255., 133./255., 144./255., 155./255., 163./255., 167./255., 166./255., 162./255., 174./255.};
2843 Double_t red[9] = { 171./255., 141./255., 145./255., 152./255., 154./255., 159./255., 163./255., 158./255., 177./255.};
2844 Double_t green[9] = { 236./255., 143./255., 100./255., 63./255., 53./255., 55./255., 44./255., 31./255., 6./255.};
2845 Double_t blue[9] = { 59./255., 48./255., 46./255., 44./255., 42./255., 54./255., 82./255., 112./255., 179./255.};
2853 Double_t red[9] = { 180./255., 190./255., 209./255., 223./255., 204./255., 228./255., 205./255., 152./255., 91./255.};
2854 Double_t green[9] = { 93./255., 125./255., 147./255., 172./255., 181./255., 224./255., 233./255., 198./255., 158./255.};
2855 Double_t blue[9] = { 236./255., 218./255., 160./255., 133./255., 114./255., 132./255., 162./255., 220./255., 218./255.};
2863 Double_t red[9] = { 225./255., 183./255., 162./255., 135./255., 115./255., 111./255., 119./255., 145./255., 211./255.};
2864 Double_t green[9] = { 205./255., 177./255., 166./255., 135./255., 124./255., 117./255., 117./255., 132./255., 172./255.};
2865 Double_t blue[9] = { 186./255., 165./255., 155./255., 135./255., 126./255., 130./255., 150./255., 178./255., 226./255.};
2873 Double_t red[9] = { 39./255., 43./255., 59./255., 63./255., 80./255., 116./255., 153./255., 177./255., 223./255.};
2874 Double_t green[9] = { 39./255., 43./255., 59./255., 74./255., 91./255., 114./255., 139./255., 165./255., 223./255.};
2875 Double_t blue[9] = { 39./255., 50./255., 59./255., 70./255., 85./255., 115./255., 151./255., 176./255., 223./255.};
2883 Double_t red[9] = { 0./255., 38./255., 60./255., 76./255., 84./255., 89./255., 101./255., 128./255., 204./255.};
2884 Double_t green[9] = { 0./255., 10./255., 15./255., 23./255., 35./255., 57./255., 83./255., 123./255., 199./255.};
2885 Double_t blue[9] = { 0./255., 11./255., 22./255., 40./255., 63./255., 86./255., 97./255., 94./255., 85./255.};
2893 Double_t red[9] = { 94./255., 112./255., 141./255., 165./255., 167./255., 140./255., 91./255., 49./255., 27./255.};
2894 Double_t green[9] = { 27./255., 46./255., 88./255., 135./255., 166./255., 161./255., 135./255., 97./255., 58./255.};
2895 Double_t blue[9] = { 42./255., 52./255., 81./255., 106./255., 139./255., 158./255., 155./255., 137./255., 116./255.};
2903 Double_t red[9] = { 30./255., 49./255., 79./255., 117./255., 135./255., 151./255., 146./255., 138./255., 147./255.};
2904 Double_t green[9] = { 63./255., 60./255., 72./255., 90./255., 94./255., 94./255., 68./255., 46./255., 16./255.};
2905 Double_t blue[9] = { 18./255., 28./255., 41./255., 56./255., 62./255., 63./255., 50./255., 36./255., 21./255.};
2913 Double_t red[9] = { 0./255., 30./255., 63./255., 101./255., 143./255., 152./255., 169./255., 187./255., 230./255.};
2914 Double_t green[9] = { 0./255., 14./255., 28./255., 42./255., 58./255., 61./255., 67./255., 74./255., 91./255.};
2915 Double_t blue[9] = { 39./255., 26./255., 21./255., 18./255., 15./255., 14./255., 14./255., 13./255., 13./255.};
2923 Double_t red[9] = { 149./255., 140./255., 164./255., 179./255., 182./255., 181./255., 131./255., 87./255., 61./255.};
2924 Double_t green[9] = { 62./255., 70./255., 107./255., 136./255., 144./255., 138./255., 117./255., 87./255., 74./255.};
2925 Double_t blue[9] = { 40./255., 38./255., 45./255., 49./255., 49./255., 49./255., 38./255., 32./255., 34./255.};
2933 Double_t red[9] = { 99./255., 112./255., 148./255., 165./255., 179./255., 182./255., 183./255., 183./255., 208./255.};
2934 Double_t green[9] = { 39./255., 40./255., 57./255., 79./255., 104./255., 127./255., 148./255., 161./255., 198./255.};
2935 Double_t blue[9] = { 15./255., 16./255., 18./255., 33./255., 51./255., 79./255., 103./255., 129./255., 177./255.};
2943 Double_t red[9] = { 99./255., 116./255., 154./255., 174./255., 200./255., 196./255., 201./255., 201./255., 230./255.};
2944 Double_t green[9] = { 0./255., 0./255., 8./255., 32./255., 58./255., 83./255., 119./255., 136./255., 173./255.};
2945 Double_t blue[9] = { 5./255., 6./255., 7./255., 9./255., 9./255., 14./255., 17./255., 19./255., 24./255.};
2953 Double_t red[9] = { 82./255., 106./255., 126./255., 141./255., 155./255., 163./255., 142./255., 107./255., 66./255.};
2954 Double_t green[9] = { 62./255., 44./255., 69./255., 107./255., 135./255., 152./255., 149./255., 132./255., 119./255.};
2955 Double_t blue[9] = { 39./255., 25./255., 31./255., 60./255., 73./255., 68./255., 49./255., 72./255., 188./255.};
2963 Double_t red[9] = { 18./255., 29./255., 44./255., 72./255., 116./255., 158./255., 184./255., 208./255., 221./255.};
2964 Double_t green[9] = { 27./255., 46./255., 71./255., 105./255., 146./255., 177./255., 189./255., 190./255., 183./255.};
2965 Double_t blue[9] = { 39./255., 55./255., 80./255., 108./255., 130./255., 133./255., 124./255., 100./255., 76./255.};
2973 Double_t red[9] = { 0./255., 48./255., 119./255., 173./255., 212./255., 224./255., 228./255., 228./255., 245./255.};
2974 Double_t green[9] = { 0./255., 13./255., 30./255., 47./255., 79./255., 127./255., 167./255., 205./255., 245./255.};
2975 Double_t blue[9] = { 0./255., 68./255., 75./255., 43./255., 16./255., 22./255., 55./255., 128./255., 245./255.};
2983 Double_t red[9] = { 34./255., 70./255., 129./255., 187./255., 225./255., 226./255., 216./255., 193./255., 179./255.};
2984 Double_t green[9] = { 48./255., 91./255., 147./255., 194./255., 226./255., 229./255., 196./255., 110./255., 12./255.};
2985 Double_t blue[9] = { 234./255., 212./255., 216./255., 224./255., 206./255., 110./255., 53./255., 40./255., 29./255.};
2993 Double_t red[9] = { 30./255., 55./255., 103./255., 147./255., 174./255., 203./255., 188./255., 151./255., 105./255.};
2994 Double_t green[9] = { 0./255., 65./255., 138./255., 182./255., 187./255., 175./255., 121./255., 53./255., 9./255.};
2995 Double_t blue[9] = { 191./255., 202./255., 212./255., 208./255., 171./255., 140./255., 97./255., 57./255., 30./255.};
3003 Double_t red[9] = { 112./255., 97./255., 113./255., 125./255., 138./255., 159./255., 178./255., 188./255., 225./255.};
3004 Double_t green[9] = { 16./255., 17./255., 24./255., 37./255., 56./255., 81./255., 110./255., 136./255., 189./255.};
3005 Double_t blue[9] = { 38./255., 35./255., 46./255., 59./255., 78./255., 103./255., 130./255., 152./255., 201./255.};
3013 Double_t red[9] = { 18./255., 72./255., 5./255., 23./255., 29./255., 201./255., 200./255., 98./255., 29./255.};
3014 Double_t green[9] = { 0./255., 0./255., 43./255., 167./255., 211./255., 117./255., 0./255., 0./255., 0./255.};
3015 Double_t blue[9] = { 51./255., 203./255., 177./255., 26./255., 10./255., 9./255., 8./255., 3./255., 0./255.};
3023 Double_t red[9] = { 19./255., 42./255., 64./255., 88./255., 118./255., 147./255., 175./255., 187./255., 205./255.};
3024 Double_t green[9] = { 19./255., 55./255., 89./255., 125./255., 154./255., 169./255., 161./255., 129./255., 70./255.};
3025 Double_t blue[9] = { 19./255., 32./255., 47./255., 70./255., 100./255., 128./255., 145./255., 130./255., 75./255.};
3033 Double_t red[9] = { 33./255., 31./255., 42./255., 68./255., 86./255., 111./255., 141./255., 172./255., 227./255.};
3034 Double_t green[9] = { 255./255., 175./255., 145./255., 106./255., 88./255., 55./255., 15./255., 0./255., 0./255.};
3035 Double_t blue[9] = { 255./255., 205./255., 202./255., 203./255., 208./255., 205./255., 203./255., 206./255., 231./255.};
3043 Double_t red[9] = { 0./255., 25./255., 50./255., 79./255., 110./255., 145./255., 181./255., 201./255., 254./255.};
3044 Double_t green[9] = { 0./255., 16./255., 30./255., 46./255., 63./255., 82./255., 101./255., 124./255., 179./255.};
3045 Double_t blue[9] = { 0./255., 12./255., 21./255., 29./255., 39./255., 49./255., 61./255., 74./255., 103./255.};
3053 Double_t red[9] = { 0./255., 13./255., 30./255., 44./255., 72./255., 120./255., 156./255., 200./255., 247./255.};
3054 Double_t green[9] = { 0./255., 36./255., 84./255., 117./255., 141./255., 153./255., 151./255., 158./255., 247./255.};
3055 Double_t blue[9] = { 0./255., 94./255., 100./255., 82./255., 56./255., 66./255., 76./255., 131./255., 247./255.};
3063 Double_t red[9] = { 26./255., 51./255., 43./255., 33./255., 28./255., 35./255., 74./255., 144./255., 246./255.};
3064 Double_t green[9] = { 9./255., 24./255., 55./255., 87./255., 118./255., 150./255., 180./255., 200./255., 222./255.};
3065 Double_t blue[9] = { 30./255., 96./255., 112./255., 114./255., 112./255., 101./255., 72./255., 35./255., 0./255.};
3071 ::Error(
"SetPalette",
"Unknown palette number %d", ncolors);
3074 paletteType = ncolors;
3077 if (alpha > 0.)
fgPalettesList.fArray[paletteType-51] += alpha/10.;
3084 for (i=0;i<ncolors;i++)
fgPalette.fArray[i] = colors[i];
static void HSV2RGB(Float_t h, Float_t s, Float_t v, Float_t &r, Float_t &g, Float_t &b)
Static method to compute RGB from HSV:
virtual const char * GetName() const
Returns name of object.
static Int_t gLastDefinedColors
Previous number of defined colors.
Float_t fBlue
Fraction of Blue.
virtual void SetAlpha(Float_t a)
static void SetColorThreshold(Float_t t)
This method specifies the color threshold used by GetColor to retrieve a color.
static Int_t gDefinedColors
Number of defined colors.
static Bool_t IsGrayscale()
Return whether all colors return grayscale values.
static const TArrayI & GetPalette()
Static function returning the current active palette.
static Int_t GetColorDark(Int_t color)
Static function: Returns the dark color number corresponding to n If the TColor object does not exist...
virtual void SetName(const char *name)
Set the name of the TNamed.
static void SaveColor(std::ostream &out, Int_t ci)
Save a color with index > 228 as a C++ statement(s) on output stream out.
static Int_t GetFreeColorIndex()
Static function: Returns a free color index which can be used to define a user custom color...
static void RGB2HSV(Float_t r, Float_t g, Float_t b, Float_t &h, Float_t &s, Float_t &v)
Static method to compute HSV from RGB.
static Int_t GetNumberOfColors()
Static function returning number of colors in the color palette.
Short_t Min(Short_t a, Short_t b)
static Float_t gColorThreshold
Color threshold used by GetColor.
static void HLStoRGB(Float_t h, Float_t l, Float_t s, Float_t &r, Float_t &g, Float_t &b)
R__EXTERN TApplication * gApplication
TObject * At(Int_t idx) const
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
static Bool_t DefinedColors()
Static function returning kTRUE if some new colors have been defined after initialisation or since th...
Array of integers (32 bits per element).
Float_t fAlpha
Alpha (transparency)
static void SetPalette(Int_t ncolors, Int_t *colors, Float_t alpha=1.)
Static function.
static const char * PixelAsHexString(ULong_t pixel)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
static Int_t GetColorPalette(Int_t i)
Static function returning the color number i in current palette.
The TNamed class is the base class for all named ROOT classes.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Float_t fGreen
Fraction of Green.
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b)
Convert r,g,b to graphics system dependent pixel value.
virtual void Print(Option_t *option="") const
Dump this color with its attributes.
virtual ~TColor()
Color destructor.
static void RGB2HLS(Float_t r, Float_t g, Float_t b, Float_t &h, Float_t &l, Float_t &s)
Static method to compute HLS from RGB.
void Copy(TObject &color) const
Copy this color to obj.
static void RGBtoHLS(Float_t r, Float_t g, Float_t b, Float_t &h, Float_t &l, Float_t &s)
static void HLS2RGB(Float_t h, Float_t l, Float_t s, Float_t &r, Float_t &g, Float_t &b)
Static method to compute RGB from HLS.
static Int_t GetColorBright(Int_t color)
Static function: Returns the bright color number corresponding to n If the TColor object does not exi...
Int_t GetLast() const
Return index of last object in array.
static void InvertPalette()
Invert the current color palette.
Float_t GetSaturation() const
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
static void NeedGraphicsLibs()
Static method.
Float_t fSaturation
Saturation.
static void CreateColorsRectangle(Int_t offset, const char *name, UChar_t *rgb)
Create the "rectangular" colors in the color wheel.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
ULong_t GetPixel() const
Return pixel value corresponding to this color.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
TColor()
Default constructor.
void Warning(const char *location, const char *msgfmt,...)
static Int_t GetColorTransparent(Int_t color, Float_t a)
Static function: Returns the transparent color number corresponding to n.
Int_t fNumber
Color number identifier.
static void CreateColorWheel()
Static function steering the creation of all colors in the color wheel.
void InitializeGraphics()
Initialize the graphics environment.
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
static constexpr double gray
static void CreateColorsGray()
Create the Gray scale colors in the Color Wheel.
virtual void SetRGB(Float_t r, Float_t g, Float_t b)
Initialize this color and its associated colors.
static constexpr double s
The color creation and management class.
Array of doubles (64 bits per element).
Float_t fRed
Fraction of Red.
Mother of all ROOT objects.
static Int_t gHighestColorIndex
Highest color index defined.
virtual void Copy(TObject &named) const
Copy this to obj.
Short_t Max(Short_t a, Short_t b)
static void SetGrayscale(Bool_t set=kTRUE)
Set whether all colors should return grayscale values.
static void CreateColorsCircle(Int_t offset, const char *name, UChar_t *rgb)
Create the "circle" colors in the color wheel.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual void ls(Option_t *option="") const
List this color with its attributes.
static void InitializeColors()
Initialize colors used by the TCanvas based graphics (via TColor objects).
void Allocate()
Make this color known to the graphics system.
const char * AsHexString() const
Return color as hexadecimal string.
virtual Int_t GetSize() const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
static Int_t CreateGradientColorTable(UInt_t Number, Double_t *Stops, Double_t *Red, Double_t *Green, Double_t *Blue, UInt_t NColors, Float_t alpha=1.)
Static function creating a color table with several connected linear gradients.
static Float_t HLStoRGB1(Float_t rn1, Float_t rn2, Float_t huei)
Static method. Auxiliary to HLS2RGB().
static void Pixel2RGB(ULong_t pixel, Int_t &r, Int_t &g, Int_t &b)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
const char * Data() const
static constexpr double g