Re: [css-color] Doubts on how we handle device-cmyk() and similar things

On Thu, 21 Aug 2014 16:28:42 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> I don't think we need to do anything about it
> for now, though; we can always add an attribute for the color space
> later, when we have declarative colorspace support.  Right?

If we don't have the tag now, we have a forward compatibility problem. If  
we don't reserve the name of an attribute to put color space information  
in, and spec the various API that take colors to reject objects that have  
unknown values there, then implicitely, we spec the various APIs that take  
colors to accept such objects and ignore the information in the color  
space attribute. Later actually giving it a meaning would then be a  
breaking change.

Take the following code snippet

var c = RGBColor(0, 128, 255);
c.profile = "AdobeRGB";
document.body.style.backgroundColor = c;

Making current browsers choke on it opens the possibility that future  
browsers could treat c as an adobe RGB color. Letting current browsers  
ignore the (unspecified) profile attribute and understand c as an sRGB  
color makes that impossible without compat issues. This is true regardless  
of the name and value type we end up picking for the color profile  
attribute.

  - Florian Rivoal

Received on Thursday, 21 August 2014 15:28:53 UTC