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

Carl Worth cworth at cworth.org
Thu Nov 4 11:39:58 PST 2004


On Thu, 4 Nov 2004 18:10:21 +0100 (CET), Jost Boekemeier wrote:
> > after thinking about it for a bit, truly arbitrary,
> > since there's no way
> > to envision what types of data an app and external
> > backend might want to
> > pass though. 
> 
> That's why I've asked how PDF and PS solve this
> problem.

I'll talk about PostScript because I understand it a bit better, (and I
believe that PDF is only superset of PostScript in this regard).

PostScript has about 40 pages of its reference manual devoted to the
handling of color spaces. I won't try to summarize all of that
here--suffice it to say that PostScript allows the user to choose the
color space in which to specify colors.

We're attempting to simplify things in cairo while still allowing the
user to specify the things she wants. I think providing the single color
space (floating-point sRGB allowing negative component values) goes a
long way toward this.

For spot colors, PostScript allows graphics to be draw to a "separation"
which is a special color space. I think this is analogous to some of the
"separate buffer" approaches discussed here recently, (particularly if
we provide support for managing and combining these).

One significant aspect of PostScript is that the specification of a
separation color space allows for an alternate color in the absence of a
spot colorant. For example a spot color of "LogoGreen" might be
accompanied with a CMYK approximation:

	[ /Separation
		(LogoGreen)
		/DeviceCMYK
		{ dup 0.84 mul
		  exch 0.0 exch dup 0.44 mul
		  exch 0.21 mul
		}
	] setcolorspace

This seems quite similar to the idea discussed here for cairo of tagging
sRGB color specification with device-specific hints, (eg. "LogoGreen").

-Carl




More information about the cairo mailing list