[cairo] Spot colors (and CMYK)

Russell Shaw rjshaw at netspace.net.au
Wed Feb 17 21:09:12 PST 2010


Russell Shaw wrote:
> Andrew Cowie wrote:
>> On Wed, 2010-02-17 at 12:46 -0700, Chris Murphy wrote:
> 
> ...

...

> Spot colours could be represented in cairo by setting the 16th bit of
> the alpha of an int16_t colour. This means the normal alpha channel is
> 15 bits....

An alternative way to handle spot colours is to first set cairo in either
of two modes: indexed (spot) colour, or RGB linear colour. This is like
the indexed colour and truecolour visuals in X. This would save sacrificing
the 16th bit of the alpha.

An image can be composed with cairo in RGB mode. The user wants to
overlay some process-specific spot colours such as "thick metallic silver".

The user draws these silver areas in cairo in indexed mode. The drawing
program can display the RGB and indexed components as two separate layers
overlayed for the user to see. To save ink, the user makes it so that where
a spot colour is painted, it clears away ink from the RGB colour layer.

In indexed colour mode, the image can be stored in a more compact mode,
because each pixel is a lookup table index for the printer-specific
backend.


More information about the cairo mailing list