Problem with TColor in root 6.06

Hello

I am trying to set some colors like

[code]
int mycolortt=TColor::GetColor("#9999cc");
int mycolorwj=TColor::GetColor("#de5a6a");

h1->SetLineColor(mycolortt);
h2->SetLineColor(mycolorwj);
but then

cout<<" colortt "<<mycolortt<<endl;[/code]

returns “0” for all and thus all histos are filled with blank…

Thanks

Alexis

I do not see this problem on MacOS 10.12.3. I get:

$ root
   -----------------------------------------------------------------
  | Welcome to ROOT 6.09/01                     http://root.cern.ch |
  |                                    (c) 1995-2016, The ROOT Team |
  | Built for macosx64                                              |
  | From heads/master@v6-09-01-1337-g8d472c0, Feb 07 2017, 10:50:04 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'      |
   -----------------------------------------------------------------

root [0] int mycolortt=TColor::GetColor("#9999cc");
root [1] hpx->SetLineColor(mycolortt);
root [2] cout<<"  colortt "<<mycolortt<<endl;
  colortt 592
root [3] 

yes, also if I run like you did, I get correctly back the colortt, but running it from inside a function does not…

Also fine for me:


$ root setmycolor.C
   -----------------------------------------------------------------
  | Welcome to ROOT 6.09/01                     http://root.cern.ch |
  |                                    (c) 1995-2016, The ROOT Team |
  | Built for macosx64                                              |
  | From heads/master@v6-09-01-1337-g8d472c0, Feb 07 2017, 10:50:04 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'      |
   -----------------------------------------------------------------

root [0] 
Processing setmycolor.C...
  colortt 592
root [1] 

setmycolor.C (140 Bytes)

ok, looks like if I dont pass the mycolortt by reference to my function, it does not work…so, all is good now!

thanks for your time