TColor to HTML


I can not figure out how to convert ROOT Color Number to HTML RGB?

Say, I have a TH1:

TH1 *plot = …;
// Now I’d like to print on the screen HTML color code that corresponds to ROOT color 5
cout << ??? << endl;

How do I do that?

I assign random colors in the macro and therefore Photoshop pick the color does not work. The RGB should be extracted in the macro.

Have you seen this ? … sHexString

Thanks, I missed this method.