- From: Garrett Smith <dhtmlkitchen@gmail.com>
- Date: Tue, 1 Sep 2009 17:52:14 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: www-style <www-style@w3.org>
On Wed, Aug 26, 2009 at 6:15 AM, Tab Atkins Jr.<jackalmage@gmail.com> wrote: > On Wed, Aug 26, 2009 at 2:35 AM, Max Romantschuk<max@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? Depends on which specification you consult. CSS 3 says it is. Deferring to CSS 3 color module would help align the specs and ensure consistency. >> 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. > "transparent" is now considerered a shorthand for "rgba(0, 0, 0, 0)". This incompatibility is introduced with the new and impoverished "CSS 3 Color" module, which offers us a change from the CSS 2.1 "candidate recommendation" (unfinished for over a decade now). What is more important is being able to read an absolute style value. Method - getComputedStyle - returns a CSS2 "computed style", but the format of the computed value varies by design, where implemented. Garrett
Received on Wednesday, 2 September 2009 00:52:54 UTC