Old -> new color scheme for root v5.16

Hi,

is there any function to calculate the new color index n>300 out of the old color index (1-200)?
My problem is, that the colors that are bright or dark (+100/+150) are not displayed correctly in the new root version.

e.g. Some of my objects where filled with 188 (bright blue) and appear white in the new root version.

Cheers Markus

see 5.16 release notes (new TColorWheel) at root.cern.ch/root/Version516.news.html

Rene

Hi Rene,

yes I know the TColorWheel. I just wanted to update all my colors automatically and have exactly the same colors (not finding a similar color in the wheel).

I also used this functionality to get the bright colors. Just a small example which I do not understand:

TH1F* h=new TH1F(“h”,“h”,10,0,10)
h->Fill(3)
h->SetFillColor(188)
h->Draw()

histogram is white (which makes sense if only the new colors >300 are supported, in old root version it was bright blue)

TColor::GetColorBright(38)

histogram gets bright blue after clicking on it, or redrawing the histogram

Do I have to call this function GetColorBright(n) to define the color for each n?

Cheers Markus

With the new schema kBlue gives the plain blue
kBlue+1, kBlue+2, kBlue+3, kBlue+4
give darker blues and
KBlue-1 etc … lighter blues

I do not know if that answer your question …

Not really,

I just included now the following line in the file where I defined my colors:

TColor::GetColorBright(n);

where n is my old (bright color) -150

e.g after TColor::GetColorBright(38);
the color 188 is defined again.

I am not sure why, but it works…

Markus