Where's my HEXa?
Posted by onRGBa and HSLa are really powerful additions to the CSS Color Module. Having the ability to set the opacity value for a color is indispensable. For most web developers though, Hexadecimal values are much more comfortable. Most of us have many Hex values memorized because we use them so often. Part of this is stubbornness. We know that RGB and HSL are “better,” but we stick with what we know.
While listening to Episode 5 of Page Break Podcast I was reminded of the problem I’ve had with RGBa and HSLa since I first read about and started using them. Why can’t the Hexadecimal color notation be extended to include alpha so we can set the opacity of a color? Hexadecimal is simply a different way of writing an RGA value. The value #ffffff corresponds to #rrggbb (so #fff corresponds to #rgb).
So, instead of rgb(102,0,255,0.5) why can’t we have #6600ff05 where 05 is the opacity on a scale from 01 (fully transparent) to 10 (fully opaque)?
Interestingly, Microsoft is doing something like this with filters to replicate opacity in browsers that don’t support it.
Am I the only one would would like to see something like this added to the spec?