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

Re: [css3-color] #rrggbbaa annotation

From: Alberto Lepe <dev@alepe.com>
Date: Mon, 5 Apr 2010 10:47:04 +0900
Message-ID: <y2l8c9249b71004041847nae9a7fdaqc93a791276ea8cb4@mail.gmail.com>
To: www-style list <www-style@w3.org>
On Wed, Mar 31, 2010 at 11:25 AM, Alberto Lepe <dev@alepe.com> wrote:
> On Sat, Mar 27, 2010 at 11:42 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> But besides that, most tools with color pickers these days let you copy a hex value from them to paste in somewhere else. For instance, I sometimes use the color picker in PhotoShop to pick the color, then copy and paste the hex value into a text editor or Safari's developer tools. PhotoSHop also shows RGB, but that is in three different fields, so it would be three times the work to copy/paste (I do sometimes manually type the values and add an alpha component for rgba() though, but that takes an extra second or so!).
>> I like the idea of #RRGGBBAA, and would have no problem picking the AA as hexadecimal.
>> On Mar 26, 2010, at 5:16 PM, Tab Atkins Jr. wrote:
>>> On Fri, Mar 26, 2010 at 5:11 PM, David Singer <singer@apple.com> wrote:
>>>> seems like if you expect to have colo(u)rs change, or more particularly you find the same constant several times in your code, you want to define your own named colo(u)rs, and then change one definition...(or use a variable, or something, waffle waffle...)
>>> True, CSS Variables would solve a lot of these problems.  If I only
>>> had to define colors once, and then could refer to them by name, it
>>> wouldn't be nearly as big of an issue.  Variables let you sweep a lot
>>> of pain under the carpet.
>>> ~TJ
> Patrick Garies wrote:
>> I've never seen any program represent opacity as anything other than a
>> decimal number or percentage
> I agree that many applications out there uses alpha channel as a
> percentage, however there are some others that express it in a 0-255
> range (evenmore, also in HEX values).
> [1] My favorite: Inkscape. As you can see in this screenshot:
> http://lukast.mediablog.sk/i/colorchoosers/inkscape-color-chooser.png
> at the bottom-right corner, the #rrggbbaa annotation is used. Also
> note the transparency range.
> [2] using #rrggbbaa annotation:
>    Google Charts API
>    Java Synth Look and Feel
>    3DMLW (3D Markup Language)
>    GML (Graph Modeling Language)
>    iCal for Mac (in theme files)
>    Maemo (Nokia)
>    swfmill
>    gbui for JME (Java Game engine), based in CSS
>    wxPython
>    Qt UI framework
>    lcd4linux
>    xine (OSD config)
>    xmCHART for FileMaker Pro
>    gwyddion
>    skEdit (themes)
>    Pixane
>    (and may other...)
> [3] using #aarrggbb annotation:
>    Microsoft IE in the gradient filter:
> filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#7FC2C2C2,endColorstr=#7FC2C2C2);
>    Color annotation in the XAML language (MS).
> [4] Color transparency in VB, C++, Delphi and other languages are
> expressed in 0-255.
> With this, I would like to state two things:
> 1) alpha channel with values 0-255 is also common.
> 2) #rrggbbaa is not a new concept and is widely used and documented.

We have presented several advantages to support this annotation and
the only objection so far is that is "too complex". We have shown that
it is not. If you still think it is too complex, then you could just
print this table and have it handy:

00 is 0% transparent
19 is 10%
33 is 20%
4C is 30%
66 is 40%
7F is 50%
99 is 60%
B2 is 70%
CC is 80%
E6 is 90%
FF is 100%

This is not complex neither for a developer nor its implementation.

Is there any other objection?
Who else is supporting this addition?
Received on Monday, 5 April 2010 01:47:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:44 UTC