Color Management

Understanding Color

Understanding Color

Color management is unfortunately still a book with seven seals for many users, but color management in PDF is actually quite simple. In order for colors to be displayed and printed correctly in a PDF file, only an ICC profile has to be attached to the file. This is the so called output intent, or target color space. If the file is consistently created in RGB or CMYK, for example, we add an RGB or CMYK ICC profile accordingly. More than one output intent is not required for correct color reproduction, provided that all objects use the same device color space.

More than one color space

Of course, there are often cases where more than one color space has to be used, especially for images. This is also not complicated if the images were created with color management and an ICC profile was embedded in the image files. These profiles can be adopted directly when inserting. The profile is then not saved as an output intent but linked directly to the image. The ICC profile is therefore used as the source color space, whereas the output intent defines the target color space.

Target Color Space and Output Intent

That is exactly what is often misunderstood. Even if only images with embedded ICC profiles are used in a file, the target color space must still be defined separately in the form of the output intent. Only if the target color space or output intent is defined, we get uniform results. Without an output intent, a standard profile is used as the target color space in PDF viewers but this leads often to different results, since the standard target color space is defined differently in most viewers.

In Adobe Acrobat and Reader, the standard target color space also depends on the contents of pages. This often causes confusion, since practically all third-party PDF viewers do it differently. In Acrobat and Reader, the standard target color space for RGB colors is initially RGB. RGB is a device color space and is also treated as such. This means that RGB colors are output directly on the monitor, but only if no transparency is used. If transparency is used, e.g. due to an alpha channel in an image, Acrobat and Reader simulate a printer color space, and a printer color space is a CMYK color space in the definition of Acrobat and Reader.

This behavior does not change even if objects use an embedded ICC profile, because this one is used as the source color space. This does not change the target color space. With RGB files with transparency we see a print preview on screen, wheras with normal RGB files the colors are output directly on the monitor. That this leads to different results is normal since CMYK color spaces are much smaller than RGB color spaces.

Recommendations

If you render PDF files with DynaPDF, you should do this with color management activated if possible. Color management is initialized in DynaPDF with InitColorManagement() with the desired standard profiles for CMYK and RGB color spaces. Specifying a CMYK profile is particularly important because CMYK colors can only be inadequately converted to RGB without color management. You can change the profiles at any time during runtime. The pages only need to be re-rendered.

This is particularly important for a soft proof, since when a page is displayed for the first time no different target color space is usually simulated.

The meaning of Color Profiles
Connecting Color Spaces
Making the right decision
Practical experience