W3C home > Mailing lists > Public > www-style@w3.org > August 2014

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

From: Florian Rivoal <florian@rivoal.net>
Date: Thu, 21 Aug 2014 17:28:28 +0200
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "www-style list" <www-style@w3.org>
Message-ID: <op.xkx7xqjqf5de51@florians-macbook-pro.local>
On Thu, 21 Aug 2014 16:28:42 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  

> 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  

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

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