[cairo] Spot colors (and CMYK)

Francois Robert frobert at atex.com
Tue Feb 23 23:48:29 PST 2010


Chris Murphy wrote:

> If I print a spot color with 50% opacity over an existing device-space
rgb, 
> the result will be (r+R)/2, (g+G)/2, and (b+B)/2, where rgb are the
existing
> device-space color there, and RGB is the (correct) translation of that
spot
> color to device space.
Sorry to sound picky here but I suppose you mean "50% coverage" not "50
%opacity" ? 

I ask because if you do mean "opacity" then that may not be true: a
stated goal of Cairo was, if I'm not mistaken, to replicate the PDF 1.4
blending model and "opacity" has a rather precise meaning in this
context. The PDF specs considers :
- the blending mode (the formula itself which is not necessarily linear)
- the opacity
- the shape 
- the blending colorspace
The usual alpha is the product shape * opacity. The PDF specs says is
better (section 7) :
<quote>
An object's opacity, in combination with the backdrop's opacity,
determines the
relative contributions of the backdrop color, the object's color, and
the blended
color to the resulting composite color. The object's shape then
determines the degree
to which the composite color replaces the backdrop color. Shape values
of
0.0 and 1.0 identify points that lie "outside" and "inside" a
conventional sharpedged
object; intermediate values are useful in defining soft-edged objects.

Shape and opacity are conceptually very similar. In fact, they can
usually be combined
into a single value, called alpha, which controls both the color
compositing
computation and the fading between an object and its backdrop. However,
there
are a few situations in which they must be treated separately;
</quote>



More information about the cairo mailing list