How to get ROOT 6 Colour Palette in ROOT 5?

I maintain various machines, and I have got ROOT 5 working on all of them. For one machine I have got ROOT 6 too, which seems a nicer version and has a much nicer Colour Palette for 2D histograms. I think it’s called kBlueYellow. However, this pallete (kBlueYellow) is not known in ROOT 5.
How can I set a colour palette in ROOT 5 that resembles the one in ROOT 6? (I could install ROOT 6 in all other machines, but this will take time)


_ROOT Version: 5.34
_Platform: Ubuntu 18
Compiler: Not Provided


{
   TCanvas *c  = new TCanvas("c","Contours",600,0,600,600);
   TF2 *f1 = new TF2("f2","0.1+(1-(x-2)*(x-2))*(1-(y-2)*(y-2))",1,3,1,3);
   Double_t stops[9] = { 0.0000, 0.1250, 0.2500, 0.3750, 0.5000, 0.6250, 0.7500, 0.8750, 1.0000};

   Double_t red[9]   = {  0./255.,  22./255., 44./255., 68./255., 93./255., 124./255., 160./255., 192./255., 237./255.};
   Double_t green[9] = {  0./255.,  16./255., 41./255., 67./255., 93./255., 125./255., 162./255., 194./255., 241./255.};
   Double_t blue[9]  = { 97./255., 100./255., 99./255., 99./255., 93./255.,  68./255.,  44./255.,  26./255.,  74./255.};
   TColor::CreateGradientColorTable(9, stops, red, green, blue, 255);

   f1->Draw("colz");
}

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.