RGB values of Pretty palette

Dear rooters, how can I get the 50 RGB triplette values back into an array? (I need to create this same palette for another application decoupled from root).

If I try

gStyle->SetPalette(1,0) ; for (int i=0; i< 50; i++) { int icol = gStyle->GetColorPalette(i); cout << icol << endl ; }
I get the internal representation of the RGB values (numbers from 51 to 100), while I need instead the corresponding triplet for each color.

The source of SetPalette doesn’t help much either for the same reason (color codes are in internal representation)

Thanks, Dario

The following should be what you need:

         TColor *c;
         Float_t r, g, b,
         Int_t icol = gStyle->GetColorPalette(i);
         c = gROOT->GetColor(icol);

The R, G, B values are returned in r, g, b