Documentation error for Picture.ColorizeMBS


In the documentation page for Picture.ColorizeMBS page, there’s this mention:
“Hue, Sat and Light in range 0.0 to 1.0 please.”

After spending a lot of time figuring out why it didn’t worked, I looked at the example and found this line:

lightness = light*2 - 1 //convert from 0-1 range to -1…1 range

So it looks like Light should be from -1 to 1, not 0 to 1.
If this is right, it’d be great to correct this.

1 Like

I can check later and change it…

For ColorizeMBS, if light is < 0, it will add 1 to it. So passing -1 should not have a big effect.
We normalize input to range 0.0 to 1.0 if needed.

Thanks for the information.
So the example file should be corrected.

lightness = light*2 - 1 //convert from 0-1 range to -1…1 range

If passing a value less than 0 has no big effect, why does the example convert to -1…1 range?