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

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