[whatwg] Adding alpha channel to <input type=color>

On Wed, Aug 26, 2009 at 2:35 AM, Max Romantschuk<max at romantschuk.fi> wrote:
> Victor Vasiliev wrote:
>>
>> I suggest to add a boolean attribute "alpha" to <input type=color>
>> (disabled by default). If this attribute is present, the color well
>> allows to set opacity value, and instead of sRGB, sends RGBA.
>>
>> Another question is which format should be used to submit RGBA color. We
>> have rgba(number, number, number, float) used in canvas, but I feel like
>> it's not the best format to be used in submited data. Maybe #rrggbbaa or
>> #aarrggbb?
>
> input type=color is specified to define a simple color:
> http://dev.w3.org/html5/spec/Overview.html#simple-color
>
> While alpha information is useful, it's not really a color attribute is it?
> Using type=color paired with type=range for alpha would serve fairly well in
> most cases, I believe.
>
> How do the people more into design feel about this? I'm mainly a coder
> myself.

Many, though certainly not all, applications that allow color-choosing
make alpha a part of the color-chooser dialog.  (Some, like GIMP,
offer it as a separate choice, similar to your <input type=slider>
suggestion.)

CSS has also trained many of us authors that alpha is a component of
colors with its rgba() syntax.

~TJ

Received on Wednesday, 26 August 2009 06:15:34 UTC