[cairo] Spot colors (and CMYK)

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


On Jan 20, 2010, at 4:17 PM, James Cloos wrote:

>>>>>> "Bill" == Bill Spitzak <spitzak at gmail.com> writes:
>
> Bill> I do not understand. What exactly do you think EVERY SINGLE  
> PROGRAM IN
> Bill> THE WORLD does with those current CMYK "alternatives" when  
> they draw
> Bill> them on the screen?
>
> Bill> I find it impossible to believe that any program does anything  
> other
> Bill> than the simplistic conversion. Any "smarter" program will  
> instead use
> Bill> the pantone color directly.
>
> Look at the XPDF or poppler src.  They follow adobe's lead in  
> converting
> DeviceCMYK to DeviceRGB (aka sRGB).  The transform is straight  
> forward,
> not too complex, but is not at all a simple r=m-1 kind of transform.
>
> Also, look for:
>
> /usr/share/ghostscript/${VERSION}/Resource/ColorSpace/DefaultCMYK
>
> and compare that against the TrivialCMYK in the same dir.  That does  
> the
> same transform.

Okay I did not have the right formula.

However this confirms my understanding that the conversion from "CMYK"  
to sRGB is fixed and has no "color management" controls. So my  
argument that no CMYK api is needed still holds: the calling program  
can do this conversion to get sRGB values to pass to Cairo, which can  
then do any color management it needs to do. The fact that a spot  
color was used does need to be sent but that requires fewer api  
modifications than also having non-sRGB color spaces.

Apparently the conversion is:

R = (1 - K)*(1 - C)
G = (1 - K)*(1 - M)
B = (1 - K)*(1 - Y)

K = min{1 - R, 1 - G, 1 - B}
if(K == 1) {
     C = M = Y = 1
} else {
     C = (1 - R - K)/(1 - K)
     M = (1 - G - K)/(1 - K)
     Y = (1 - B - K)/(1 - K)
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20100120/56f68d6e/attachment.html 


More information about the cairo mailing list