TColor in HLS system


Running on root 5.14 or 5.16 the following:

Float_t R, G, B
TColor::HLS2RGB(90, 1., 1., R, G, B)
std::cout << "R=" << R << " G=" << G << " B=" << B << std::endl;

I get the output “R=1 G=1 B=1”, that is to say: white.
Using a graphics program (GIMP), colors with full saturation and luminosity are not white but very bright and intense colors (in the example, a 50% red, 100% green, no blue).
I assume you are using some different definitions (maybe luminosity), but I can’t guess which.
Could you explain?

Thank you very much.

The closest light is to 1 the closest the color is white. When equal to 1 it is fully white… For me that makes sense and it is how the algorithm is implemented.
May be try TColor::HSV2RGB

This means that if I want to have the most “colored” color, I have to use a light 0.5, right?

I can’t find TColor::HSV2RGB in ROOT 5.14/5.16 (documentation or headers). Where can I find it?

HSV system is in the latest root version.
Yes I think .5 for light is the answer. I do not remember exactly the algorithm but I think you are right.