Re:HSLuv, a developer friendly perceptual color space
by jfkebwjsbx on Monday March 09, 2020 @10:06PM
(#22532106)
Why not convert to linear sRGB (with higher bits per sample) instead? Something like what PNG supports for 16-bits. Does that give incorrect results too compared to going through CIELAB?
[ Parent
| on HN ]
Re:HSLuv, a developer friendly perceptual color space
by anchpop on Monday March 09, 2020 @10:56PM
(#22532355)
For interpolation, averaging, etc. anything based on RGB is not going to give good results. For example, if you average pure red and pure blue, you should get something like pure purple. But if you do that in RGB you'll get #7f007f, a much darker color than either pure red or pure blue. If you do it with LAB, you'll get #ca0088, which is perceptually about as bright as either of the colors you started with.
Re:HSLuv, a developer friendly perceptual color space
by ThJ on Tuesday March 10, 2020 @02:47AM
(#22533322)
It helps to use linear gamma when manipulating RGB values. Linear gamma fixes most issues with interpolating and mixing RGB values and that’s also why most modern CG pipelines use it. It produces the most natural results.
Re:HSLuv, a developer friendly perceptual color space
by mark-r on Tuesday March 10, 2020 @11:12AM
(#22536104)
Yes linear gamma generates the most natural results, because that's the way physical light combines. Gamma was a great invention for display and transmission but it sure wrecked our ability to mix colors.
Re:HSLuv, a developer friendly perceptual color space
by jfkebwjsbx on Tuesday March 10, 2020 @01:52PM
(#22537722)
Thank you!