[cairo] Spot colors (and CMYK)

Bill Spitzak spitzak at gmail.com
Wed Jan 20 12:15:34 PST 2010


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.

C,M,Y,K can themselves be spot colors, perhaps with predefined ids.

We do not need Lab or XYZ as the alternate. Because Cairo's api supports 
negative floating point numbers it can cover any 3D volume of color 
using any three primaries that are not on a straight line. Staying with 
the sRGB primaries will make things easier for most back ends and most 
users. (the real question is how to represent negative values in the 
non-linear sRGB gamma curve. Microsoft with their scRGB chose to 
continue the gamma curve past 1 and to mirror-image the positive curve 
to make the curve for numbers less than 0, so that should be what is 
used here).

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). 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. I still 
think this may be a good idea, it would remove all Pantone IP from the 
interface, allow a fixed-sized color structure (4 floats plus a single 
enumeration), and would prevent malicious programs from, for instance, 
asking for the "C" spot color but with 1,1,1 as the sRGB values.

Bill


More information about the cairo mailing list