[cairo] RFC the idea of n-plane color support

Carl Worth cworth at redhat.com
Wed Nov 3 08:27:01 PST 2004


On Mon, 01 Nov 2004 21:11:40 +0100, Alexander Larsson wrote:
> What about spot color support in Cairo? Spot colors don't mix well with
> blending and transparency, but they are used a lot in printing.

Thanks for bringing this question up.

As I've been saying, I'm no expert in color, so I had to do a little
background reading[*] on spot colors. These are special colorants
available in some output devices to produce colors or other effects that
can not be achieved through combinations of process colors (ie. cyan,
magenta, yellow, and sometimes black).

For example, someday I might put a particular CairoLogoBlue ink
cartridge in a printer. Or a printer might provide special metallic,
fluorescent, or textured output with spot colorants.

So, the need to access spot color output looks to me like an extension
of the desire Ross has been expressing to get things like "pure
black". We have an arbitrary number of named colors that cannot be
accurately produced by combining the standard process colors.

Using a spot color seems rather incompatible with operations that
produce new colors through combinations of input colors. This includes
compositing translucent images as well as the blending that occurs
around the edges of antialiased geometry. These things are incompatible
insofar as the results will place process approximations next to spot
colorants which may lead to undesirable results.

One means of avoiding this problem would be to draw the spot color
portions to a separate buffer, (perhaps a 1-bit or 8-bit buffer). This
is similar to an idea proposed by Keith earlier for providing complete
control of CMYK. And it may be that cairo should be augmented to
simplify the management and/or combination of these separate buffers. I
think we'll only know that after people try this approach.

Another approach would be to allow the user to specify a named spot
colorant alongside an approximation of that color through the standard
cairo sRGB interface. A similar approach is used in PostScript. This
would allow backends that do not have the spot colorant to still provide
a reasonable approximation of the result. And any problems with
translucency and antialiasing would simply have to be avoided by the
user as desired.

So there are a couple ideas for the problem of:

	I want some specific colorant to appear in this region of the
	output.

Which seems to me a separate issue from:

	Here is an ideal description of my color image. How should this
	be rendered by my n-color process printer?

For this more general question, I'm in favor of providing a single,
complete color space to the user to describe the appearance. Then, the
device-specific backend would be responsible for mapping the ideal
colors to the constraints of its process, (with any of the millions of
techniques Ross alluded to).

But, I'm an idiot when it comes to all of these issues. That's why my
plan in this area is to wait until the author of a compelling
application provides some feedback, (preferably after experimenting with
what's possible with cairo today).

-Carl

[*] I read every reference for "spot colors" or "spot colorants" in both
the PostScript and PDF 1.4 reference manuals. Interestingly, there were
2 page references in the PS manual compared to 17 references in the PDF
manual. Considering that the PDF manual borrows text heavily from the PS
manual, it's clear that the transparent imaging model adds a fair amount
of complexity to the handling of spot colors.



More information about the cairo mailing list