'Mismatch of values in the color triangle

Maxwell Color Triangle with Matplotlib

If you maximize the brightness based on formula RGB(r,g,b) -> 1 / max(r,g,b) * RGB(r, g, b), moving from any vertex along the side of the triangle, the value of 128 will not coincide with its quarter (0.25), but will be slightly shifted to the center (0.35). Any ideas how to fix it?

1 / max(r,g,b) * RGB(r, g, b) Result



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source