Re:The Code Side Of Color
by trebor on Thursday October 04, 2012 @12:57PM
(#4613205)
Maybe I'm getting old, though I'm not even 30 yet, but I've never grasped HSL like I have RGB and RGBA. I come from a background of toying with OpenGL and game programming, so it became habitual as that was the required structure ~10 years ago.
[ Parent
| on HN ]
With openGL, DirectX, and other real-time rendering I believe sRGB or linear gamma are preferred because there are library and possibly hardware primitives that can be taken advantage of.
Outside of that I feel we should be notating color in terms of the L* a* b* colors
Re:The Code Side Of Color
by jarek-foksa on Friday October 05, 2012 @01:47AM
(#4615811)
Web browsers also seem to be using RGB for storing colors internally. You can specify colors in HSL, but retrieved values are only in RGB. E.g. if you write "hsl(100,0%,0%)" in your CSS file then the color will be represented as #000000 in DOM/CSSOM. This is especially annoying when you are trying to implement color picker because information about hue is lost if saturation or lightness are low.