3 ms·
It looks neat, but I have a subtle suggestion; why not output CSS HSL colour codes instead of RGB? It's supported in all relevant browsers (IE9+). HSL has the
by Freak_NL 10y ago
It looks neat, but I have a subtle suggestion; why not output CSS HSL colour codes instead of RGB? It's supported in all relevant browsers (IE9+).
HSL has the benefit of explicitly showing the colour's hue, saturation, and lightness — meaningful values compared with RGB's three colour channels, which is something you might want to stimulate with a tool like this.
With HSL a minor change in saturation or lightness can also be done directly from the CSS (or SASS) code by whoever is maintaining the stylesheet.
# Green.
hsl(130, 41%, 33%)
rgb(50, 119, 62)
# Slightly more vibrant green — note that only the saturation value changes.
hsl(130, 53%, 33%)
rgb(39, 130, 55)
- crestfallen 10y agoI did a big survey of site stylesheets a while back and HSL use in practice is super, super low. I'll see if I can dig up that old spreadsheet. And that's the reason I love your suggestion. With some browser support reassurances to the user (HSL is safe to use!), a neat tool like this outputting HSL could help the HSL adoption rate. HSL is pretty nice to work with, so I'd love to see more of it.