Re: ideas for future css versions ...

Mikko wrote:
>
> Ian Hickson wrote:
> > On Thu, 2 Sep 2004, Brian Hunger wrote:
> >>alpha!
> >
> > http://www.w3.org/TR/css3-color/#rgba-color
> > Already supported by Safari.
>
> Why not support #1234 and #12345678 formats too? The RGB color
> syntax already supports #123 and #123456
> <URL:http://www.w3.org/TR/css3-color/#rgb-color>. A new syntax with
> 4 or 8 digits wouldn't collide with the old mechanism, instead it
> would be a logical extension.
>
> For example, #7777 would be 50% transparent 50% grey, #f004 would be
> ~25% opaque red etc. The short forms would be expanded just like RGB
> values: double the digits. The above examples would be equal to
> #77777777 and #ff000044 or rgba(127,127,127,127) and rgba(255,0,0,68)
>
> -- 
> Mikko

Yes, the RGB-A color format would be a great addition.  There are many uses
for such that I can think of.

I am curious, however, about the four-digit shorthand version.  It was my
understanding that the three-digit shorthand for the hexidecimal color
palette was double the digits, yes, but not in the way you proposed for the
four-digit shorthand of the RGB-A palette.

In other words, #123 would indeed be #123123.  My understanding is that
#1234 would be #12341234.  Is my understanding flawed?  Should it be #112233
and #11223344, instead?

Well, whatever the case, I still think that the addition and support for the
RGB-A color palette would be a useful addition.  A few cool effects could be
then easily achieved with CSS instead of JavaScript (ugh) and, thus,
completely cross-browser.

-W. Leon Sutton, Jr.

Received on Friday, 10 September 2004 01:18:29 UTC