Note that hsl is a breeze to set, but a pain in the ass to get. Browser engines convert it to rgb(a) and if you want to check if anything has, say, saturation 100% you must first convert back to hsl from rgb.
To make matters worse, the hsl color spectrum covers colors that RGB can't represent, so you if you're checking for a particular color the conversion algorithm will throw you back something with a few digits off.
You are right, what I meant is that you can set h = 200 s = 100% l = 0% and you will get back R = 0, G = 0, B = 0.
> These are rounding errors, and shouldn’t be especially noticeable. So what?
Not to the eye, but for computers it is. Say you want to check if an element has a background color of hsl(100, 30%, 30%) because you set this color before. Well, you can't. I ran into this problem while building http://memela.com and I had to switch to rgb because of this.
To quote from the blog post that page links to: "HSL is supported in almost all the major browsers: Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 10+ and Explorer 9.0+."
Not being supported in IE before IE9 means this is pretty unusable for anything commercial, unfortunately. I mean, we only just got to drop support for IE6...
Fallback style with HSL(a) is.... doable but kinda sucks:
div { background-color: #BADA55; background-color: hsla(74, 64%, 59%, 0.7); }
And then hypothetically you could use a filter to get the alpha color in IE, but then you use AARRGGBB hex notation which kinda defeats the whole purpose.
Might end up rolling this solution into http://css3please.com soon to make it a touch easier.
If you mess with Processing, Cinder, oF or any other creative coding frameworks, using HSL is much easier for programmatically creating visuals and gradients...
In non-web programming areas, HSL (or HSV, take your pick) is a great way to quickly make a heatmap out of a range of values. Just scale them and map them from 0 (hot) to 240 (cold) and peg the other values. Purple looks out of place so I avoid it.
Every now and then someone explains something that should have been completely obvious and I get floored. Of COURSE that's how hsl works, how else could it work? Love it.
>You might want to enable JavaScript or get a modern browser.
Javascript enabled and browser is "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.12) Gecko/2009070811 Red Hat/3.0.12-1.el5_3 Firefox/3.0.12" so I should be fine.
Error Console does report an interesting little tidbit;
Then there is a real simple solution for you, don't claim that your site is compatible with Firefox 3.0 + ... because it clearly is not. Say what you do, do what you say.
In the context of this thread and the given subject matter, that the linked page supports Firefox 3.0+, the browser I was browsing with at that time should have been able to render and execute the page correctly according to what the author of the page claims. I did not say a word about that browser being vulnerable to any given browser exploits.
well that was kind of the structure of the joke: juxtaposing a different meaning of the words you wrote with information on browser vulnerabilities.
I don't see a statement about browser support on the site or on the submission, but maybe you're referring to the linked blog post? The blog post lists Firefox 3.0+ as a browser that supports hsla, not browser support for the color picker site.
To make matters worse, the hsl color spectrum covers colors that RGB can't represent, so you if you're checking for a particular color the conversion algorithm will throw you back something with a few digits off.
Otherwise yes, hsl rocks!