- From: Florian Rivoal <florian@rivoal.net>
- Date: Thu, 21 Aug 2014 23:04:08 +0200
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: "www-style list" <www-style@w3.org>
On Thu, 21 Aug 2014 22:17:28 +0200, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > Before we introduce color profiles, anything > using a color object will assume it's in the sRGB colorspace. Putting > a .profile attribute on it wont' do anything for the old browsers. > This is similar to CSS - if you try and pass a colorspace argument to > a color function, it'll be invalid. Just like CSS, if you want to be > robust in both worlds, you need to provide an sRGB version as well. > (In CSS, you provide it unconditially and first; in JS you > feature-test and provide it only if the browser doesn't support > profiles). > > (At least this fails gracefully - being in the wrong colorspace just > means your colors will be a bit off, but are still more-or-less > correct.) We could pick a property right now, decide what value of that property means sRGB, and throw an exception if you get anything else. Then putting a .profile attribute with something else than sRGB in old browsers gets you an exception, rather than a wrong color, so that you can deal with it. I like graceful failing in declarative things, but in JS, I'd rather get errors thrown back at me so that I can deal with them. - Florian
Received on Thursday, 21 August 2014 21:04:33 UTC