[cairo] Spot colors (and CMYK)

Bill Spitzak spitzak at gmail.com
Wed Jan 20 13:07:39 PST 2010



Chris Murphy wrote:
> 
> On Jan 20, 2010, at 3:15 PM, Bill Spitzak wrote:
> 
>> What is needed is "this is a spot color with this id" along with "here is the sRGB alternative". Devices that do not understand spot colors can use the alternative. Drivers that do recognize the spot color can instead allocate another channel (along with RGB) to accumulate it and set RGB to zero. After compositing is done they convert the remaining RGB into ink levels.
> 
> sRGB is effectively device-independent, but still has a gamut limitation.

There is no gamut limitation if negative values are allowed.

> To get to sRGB alternates, requires that you start out with XYZ or LAB in the first place. Why convert and lose fidelity in the process?

Because any loss of fidelity in 32 bit floats is negligable. The basic 
problem is that end users DEMAND sRGB api because 99.9% of their data is 
in this format. So any API must have sRGB. I do not believe APIs should 
be complicated unless there is absolute necessity and so far I do not 
see any argument why the color values themselves cannot be sRGB.

> Encoding isn't relevant to users, it shouldn't be made relevant.

The entire reason for this is so that the majority of end users do not 
have to care about "encoding". They may be able to get "divide by 255 
and send that floating point number" and asking for anything else is 
unreasonable.

> I have no issue with using scRGB as a compositing space. But for spot color alternate definition there's no advantage in terms of quality or performance. I disagree that it's easier for backends. It actually complicates things because not all of the present file formats support floating-point. They do support either XYZ or LAB. And floating-point is only recently being discussed at the ICC level, and is not presently in the current ICC specification.

We will define the mapping between unclamped sRGB to XYZ. ICC does 
define everything in XYZ, therefore by adding this definition we have 
defined everything in Cairo colorspace.

> 
>> If Pantone colors come with a CMYK "alternative", this is an approximation already! I see no problem with further approximating it by the simplistic conversion (r=1-c-b, etc in sRGB gamma space).
> 
> Well, except that it will look like crap times two, instead of crap times 1. The industry has been there, done it, and rejected it as demonstrated with massive end user confusion. Approximation means mediocre results. 

I do not understand. What exactly do you think EVERY SINGLE PROGRAM IN 
THE WORLD does with those current CMYK "alternatives" when they draw 
them on the screen?

I find it impossible to believe that any program does anything other 
than the simplistic conversion. Any "smarter" program will instead use 
the pantone color directly.

> 
>> The advantage is that this is pretty much reversable (perfectly reversble if the value for b is known). Not only that I would not be suprised if 50% of those "approximations" were done by choosing the values so that this simplistic conversion of sRGB produced the best screen result!
>>
>> I previously suggested that if the mapping from spot colors to sRGB values is unique (ie all spot colors map to different sRGB values) then no id needs to be sent, just the "this is a spot color" flag.
> 
> It's not guaranteed that all spot colors will map to unique sRGB values. In fact it's certain they won't given the sRGB gamut.

As before, out-of-gamut is quite possible. I thought it might be 
possible to tweak the values slightly in the lower bits so they are all 
different.

> The color of a spot color depends on the kind of paper it's going to be printed on. So if you want to approximate this, whether it's printing on C, M, or U is relevant to getting the color even close to correct, the darker and more saturated the spot color is.

That is why the sRGB is an APPROXIMATION. Who cares how accurate it is. 
Any attempt to make it better should be the responsibility of the 
programs and drivers, it is a fallback so that drivers do not need to 
know anything about pantone colors or CMYK.

However I do see it plausable that this means the 1:1 mapping I suggest 
should not be done. This would allow a program to select a "more 
correct" alternative color for the spot color depending on other 
information it knows.


More information about the cairo mailing list