W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [css-color] Have you considered standardizing a rgba(#RRGGBB, <alpha-value>) notation?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 9 May 2013 15:02:53 -0700
Message-ID: <CAAWBYDBk=pugE0izWCkdpPNG8gTahWSRV4kX8np5UEetK0RXSQ@mail.gmail.com>
To: "Sam L'ecuyer" <sam@cateches.is>
Cc: Brad Kemper <brad.kemper@gmail.com>, François REMY <francois.remy.dev@outlook.com>, Lea Verou <lea@w3.org>, Sebastian Zartner <sebastianzartner@gmail.com>, Jake Archibald <jaffathecake@gmail.com>, Šime Vidas <sime.vidas@gmail.com>, www-style list <www-style@w3.org>
On Thu, May 9, 2013 at 2:18 PM, Sam L'ecuyer <sam@cateches.is> wrote:
>
>> The first one seems to mean that the red channel is set to 3/4 of the alpha (opacity) channel. I don't know what the second one is supposed to mean.
>
> As far as I know, opacity doesn't get applied to individual color channels.
> As long as all of these resolve to the same thing, I'm for it.
>
> color(#ff4500, alpha 50%);
> color(orangered, alpha 50%);

These resolve to the same value.

> color(255, 69, 0, .50);

This won't exist - I assume you mean "rgba(255, 69, 0, .50)".

> color(255, 69, 0,alpha * .5);

Assuming you mean "color(rgb(255, 69, 0), alpha * .5)", no, this will
be the same as the above, but only by accident.  It'll cut the current
alpha channel by half, which happens to set it to 50%, since it starts
at 100%.

~TJ
Received on Thursday, 9 May 2013 22:03:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:29 UTC