Re: [css-gcpm][css-color] device-cmyk() interaction with RGB-space colors.

On Sep 12, 2013, at 5:41 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Thu, Sep 12, 2013 at 8:29 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
>> Hi,
>> 
>> In CSS Color Level 3, all values of the <color> type (eventually) resolve to
>> a (R, G, B, A) value.
>> 
>> When multiple colors interact with each other in an interpolation
>> (transition, animation, or gradient) or with alpha compositing
>> (transparency), they do so in RGBA space.
>> 
>> 
>> The addition of device-cmyk() changes that: not all colors are in the same
>> space anymore. The spec needs to define how interpolation and alpha
>> compositing works.
>> 
>> Note that probably none of these cases are useful, we just need to pick
>> something so that they’re well-defined.
>> 
>> Possible suggestions:
>> 
>> * Gradients whose color stops are not all in the same color space could be
>> invalid.
>> 
>> * I don’t expect any media to support both CMYK colors and
>> transition/animations. But in case it happens, interpolating colors in
>> different color spaces could switch at 50%, like interpolation of other
>> discrete types.
>> 
>> * Alpha compositing could be done in device CMYK space, after all RGB colors
>> have been converted per a device-specific color profile.
>> 
>> 
>> There may be further interactions with the Filter Effects and Compositing
>> and Blending specs that need to be specified.
> 
> If you ignore the gamut limitations, all color spaces are
> interconvertible between each other, right?  For example, a very
> bright red might be rgba(120%, 0, 0, 1), but that's still a valid
> number which can be interpolated with other rgba colors.

For most specifications, colors are defined for a range of 0 to 255 (or 0.0 to 1.0). So 120% would go over this range which makes a difference for a bunch of specifications like Filter Effects, Blending, SVG. (No comment to the general intention to go beyond this range.)

Greetings,
Dirk

> 
> ~TJ
> 

Received on Thursday, 12 September 2013 18:39:00 UTC