W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: [css4-color] #RGBA

From: Molly E. Holzschlag <mollyh@opera.com>
Date: Mon, 06 Sep 2010 14:38:42 -0400
To: "Patrick Garies" <pgaries@fastmail.us>, "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Brian Manthos" <brianman@microsoft.com>, Christoph P├Ąper <christoph.paeper@crissov.de>, "www-style@w3.org list" <www-style@w3.org>
Message-ID: <op.vimjeoqbw4nav6@mollydotcom.local>
RGB and HSL are completely different color spaces. HSL, as Tab has  
indicated, has no known corollary to hexadecimal or shorthand notation.

In RGB, you must use an integer to get a certain color rgb(50, 100, 80) or  
a percentage rgb(50%, 100%, 80%). The alpha transparency is simply a value  
in the fourth spot from 0-1.0 to denote opacity/transparency.

In HSL, the model is completely different. We take a traditional color  
wheel of 360 degrees, with 1 and 360 both representing red. The integer we  
take from HSL is an angle on the wheel. Then, we add percentages of  
saturation and light hsl(300, 50%, 50%) and we then add a fourth value  
 from 0-1.0 to denote opacity/transparency.

What we need to realize is that HSL is *by design* far more intuitive than  
RGB, which means having corollaries to hex or shorthand are not required.  
Go ahead and give it a try. You start with the HUE, and then you saturate,  
or add light. You never have to look up a color except perhaps for the  
first integer. After that, it's an extraordinarily intuitive means of  
working with color, creating palettes that work well together, and so on.

So even if there were a way to shorthand HSL it doesn't make sense from a  
design standpoint to do so. It's a shorthand in and of itself.

-- 
Molly E. Holzschlag
Web Evangelist, Developer Relations, Americas
Member, W3C CSS Working Group
Opera Software mollyh@opera.com
"Follow the Standards / Break the Rules"
http://dev.opera.com/ http://molly.com/
 
Received on Monday, 6 September 2010 18:39:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:31 GMT