Ogeon/palette

Clear up the luma vs. luminosity mixup

Ogeon opened this issue · 1 comments

The current Luma type isn't actually representing luma. It's relative luminosity with or without gamma compression, which is fine and what's usually encoded in grayscale images if I understand correctly. The problem is that the terminology is misleading for anyone who actually wants luma.

The difference is that to get the relative luminosity from RGB, the linear values are used. To get the luma, the gamma compressed values are used. It's possible that the coefficients can be different for luma too, but I need to look into that.

What to do? I think the simple solution is to rename Luma. I'm not sure there's a need for an actual luma type, but that one can take the name in that case.

Let me know if you have naming suggestions. I'm thinking about calling it Luminance, but something easier to understand is also an option.

"Mono" for monochrome is also an option. More neutral.