[cairo] [RFC] Color space API (partial proposal)

Chris Murphy lists at colorremedies.com
Thu Feb 25 09:14:13 PST 2010

On Feb 25, 2010, at 3:51 AM, Adrian Johnson wrote:

> ecir hana wrote:
>> On Wed, Feb 24, 2010 at 12:52 PM, Adrian Johnson <ajohnson at redneon.com> wrote:
>>> After looking at the ICC specification it should be possible for the PDF
>>> backend to generate a tint transform from an ICC profile for a DeviceN color
>>> space and an ICC profile for the alternate color space.
>> Could you please describe this in more detail? How does the mechanism
>> of "generate a tint" works? And how exactly should a user proceed?
> On IRC Andrea pointed out that ICC profiles can contain named colors. After reading about named colors in the ICC specification I don't think  we don't need any special API for DeviceN colors. Just use the named ICC profile as you would for any other color space.

We need to be really clear on what it is we're talking about, because this statement is mixing and matching terms, and to me it's confusing. There are 7 different kinds of ICC profile. None are combinable (i.e. you cannot have a profile that is both an input and output profile, or both a named color profile and output profile).

Input profiles are for input devices (scanners, and cameras). We shouldn't be using this term except in the context of a scanner or camera profile, because otherwise it's confusing. Many use "input profile" when they mean "source profile", for example.

Output profiles are for output devices (printers, presses). Again, often it's used incorrectly to mean "destination profile". An output profile can be used as a source profile or destination profile, it depends on the situation.

Output profiles can be gray, RGB, CMYK, or up to 15 channels. It's probably OK to refer to a 5+ channel output profile to be referred to as a DeviceN profile, although DeviceN is a PDF term, not an ICC one. Perhaps more specific would be to say DeviceN output profile.

In the case of Book Cover #1, which contains CMYK artwork and one spot color to be used strictly as a solid color (let's say it's used as a border, which is a vector illustration object). This is not DeviceN. It's CMYK + 1 spot. It is 5 channels, but there is no 5 channel color separation used for any object in the entire cover. Every object is using somewhere between 1 and 4 channels. Never all five at the same time. So in a PDF context, this means tagging the PDF as a whole with a single CMYK output profile, as the "output intent" so that all CMYK content has an implicit source profile, even if those objects are actually /DeviceCMYK. The object using the spot color needs to be defined with the spot color name and an alternate, not an ICC profile. That spot color alternate, I'm arguing, should be LAB based. The present convention in professional printing is to use a CMYK alternate primarily for legacy reasons, not logical ones.

In the case of Book Cover #2, which contains primarily CMYK artwork but one image that also utilizes a spot bump plate, is actually using all five channels at the same time. While this is a good use case for a 5 channel DeviceN output profile to be associated with this object, that is almost never the case as far as I'm aware. It's treated exactly like the case above. Why? Well bump plates are often used where you just want a little boost to a particular color, such as blue sky, and such a 5th channel is created manually based on experience rather than automatically generated using a 5 channel output profile to create a custom separation. The vast majority of CMYK + spot (even if it's used a a bump plate) are not being custom profiled, so there is no 5 channel profile.

In the case of Book Cover #3, which contains 6 channel separations for a Hexachrome printing process, now you do have a case where you have only CMYKGO, 6 channel output device profile. There technically isn't even a spot channel. In this case, the single 6 channel output profile is the applicable output intent for the entire document.

So just because you have a certain number of channels, does not mean you have a particular output profile. It depends on how the artwork is created.

Chris Murphy
Color Remedies (TM)
New York, NY
Co-author "Real World Color Management, 2nd Ed"

More information about the cairo mailing list