Problem with white background color in custom style

Dear all, using this custom style in a rootlogon.C file

{
  TStyle *atlasStyle= new TStyle("ATLAS","Atlas style");
  Int_t icol=0;
  atlasStyle->SetFrameBorderMode(icol);
  atlasStyle->SetCanvasBorderMode(icol);
  atlasStyle->SetPadBorderMode(icol);
  atlasStyle->SetPadColor(icol);
  atlasStyle->SetCanvasColor(icol);
  atlasStyle->SetStatColor(icol);
  atlasStyle->SetHistFillColor(icol);
  atlasStyle->SetFillColor(icol);
  gROOT->SetStyle("Plain"); 
  gROOT->SetStyle("ATLAS");
  gROOT->ForceStyle();
}

in ROOT 5.22 i’m unable to get a plot in pdf format with white (color=0) background color, still gray one. This was working with older ROOT version, is something changed ?

Thanks
Max

I have a white background and my rootlogon.C is:

   gStyle->SetCanvasColor(0);
   gStyle->SetFrameBorderMode(0);
   gStyle->SetStatBorderSize(1);
   gStyle->SetFrameFillColor(0);
   gStyle->SetTitleFillColor(0);
   gStyle->SetPalette(1);

To understand your issue can you

  • start ROOT
  • create “new TCanvas” from the root prompt
  • execute your macro
    in this order.

Does it make any difference?