Step by step - Learn how to use callas productscallas pdfToolboxColor conversionProcessing black objects (deprecated, available till v10.2)

Processing black objects (deprecated, available till v10.2)

General

Black and tinted black (Gray) objects in PDF files can be rendered in different ways.

Common color spaces

DeviceGray

Gray color space with 1 channel

0% represents black in this color space

DeviceCMYK

CMYK color space with 4 channels

C, M and Y are 0 %, where only the black (K) channel is used

Separation Black

Color space with 1 channel

Uses only the K channel of the process colors for output

DeviceN Black

Color space with 1 channel

Uses only the K channel of the process colors for output

Other color spaces

There also is a special form of black in the following color spaces:

DeviceRGB

If all color components have the same value, the visual representation is tinted black.

Lab

If the color values for a and b equal 0, the visual representation is tinted black.

ICC based color spaces

Additionally there are the following color spaces:

ICCbasedGray, ICCbasedCMYK, ICCbasedRGB

When processing black it is recommended to ignore ICC profiles, since this would lead to a conversion of black using the PCS of the ICC profile resulting in rich black defined in CMYK (assuming the destination profile to be a CMYK profile).

Default handling

Depending on the color space the black is defined in, it will normally be processed like all the other colors in this color space; e.g. a black in DeviceCMYK will be processed like the other CMYK values.

Within the scope of print production though it is preferable to treat every black the same, no matter how it is defined internally. To process black elements properly according to the settings in the gray conversion, the following parameters are available:

  • SetGrayColorSpace
  • R_eq_G_eq_B_is_Black
  • a_eq_b_eq_0_is_Black
  • C_eq_M_eq_Y_is_Black

Note:

Please keep in mind that some of the parameters mentioned in this article have to be supplemented with a prefix (e.g. "RGBImage-..." or "CMYKGraph-...") before they can be used in the policy file to ensure correct processing.
Details can be found in the article: Policies

When is black considered as black?

The color conversion engine uses a small tolerance when detecting black objects. So the objects considered as "black" might have a slightly different colorant value, but as their visual appearance will be gray when printed, they'll be handled the same way as if there colorant values were completely the same (also called "gray balance").

The used tolerances for the different colorspaces are:

Lab:
Tolerance = 1%
((|L - a| <= 0.01) & (|L - b| <= 0.01)) = Gray

RGB and calRGB:
Tolerance = 3%
((|R - G| <= 0.03) & (|G - B| <= 0.03) & (|R - B| <= 0.03)) = Gray

CMYK:
Tolerance = 0%
(C == 0) & (M == 0) & (Y == 0) = Gray

Setting up

Behavior of "Black" defined in common color spaces during color conversion using policy "Default"

In the usual cases it is desirable, that black/gray elements are only represented in the K channel after any conversion. Therefore you may use the option "Preserve Black" in the fixup "Convert colors". This guarantees that all black objects are converted according to the gray treatment defined in the color policy file.

The parameters set by the option "Preserve Black" are:

  • SetGrayColorSpace     Separation_Black
  • C_eq_M_eq_Y_is_Black     Separation_Black

The parameters set in the "Standard" color policy file (overruling the parameters set by the option "Preserve Black") are:

  • SetGrayColorSpace   NoChange
  • Gray_AdvancedColorConversion   AdjustDotGain

Elements defined in DeviceGray remain DeviceGray after conversion. Gray elements defined in DeviceCMYK/Separation Black or DeviceN Black are mapped to Separation Black after the conversion.

Conversion of RGB/Lab Black/Gray to CMYK

The parameters set by the option "Preserve Black" are:

  • R_eq_G_eq_B_is_Black     Separation_Black
  • a_eq_b_eq_0_is_Black     Separation_Black

The option "Preserve Black" converts any RGB and/or Lab black to Separation Black, if objects of this color space are converted to CMYK. This conversion applies for images as well as for text and vector objects. During this conversion RGB gray scales are mapped 1:1 to Separation Black. This means, a 50% RGB gray (127/127/127) will be 50% Separation Black after conversion.

Tone value adjustments for conversions amongst different printing conditions

If files are converted amongst different printing conditions the different dot gain might be counterbalanced. The following parameters – seen as defined in the policy "Standard" – allow to compensate the different dot gain:

  • GrayGraph-AdvancedColorConversion     AdjustDotGain
  • GrayImage-AdvancedColorConversion     AdjustDotGain

The difference in dot gain between the gray source ICC profile and the destination ICC profile will be compensated. 100% Black remains unchanged.

Changing the destination color space of Gray

By changing the color policy file it is possible to define the destination color space of gray elements with the following parameters:

  • SetGrayColorSpace
  • R_eq_G_eq_B_is_Black
  • a_eq_b_eq_0_is_Black
  • C_eq_M_eq_Y_is_Black
NoChange
Element will be converted according to the settings for the correspond­ing color space
DeviceGray
Element will be converted according to the settings for the color space "Gray" and stored in DeviceGray
CMYK_Black
Element will be converted according to the settings for the color space "Gray" and stored in DeviceCMYK – Black channel only
Separation_Black
Element will be converted according to the settings for the color space "Gray" and stored in Separation Black
  • Attention: In DeviceGray, a defined Overprinting flag will have no influence on subjacent CMYK elements. These will always be knocked out.

Preserve black: Exclude certain BlendModes from special handling (pdfToolbox 9.2)

Some special transparency effects are based on the interaction of color channels and therefore, a conversion of objects using a gray balance of a process color (e.g. RGB, CMYK or Lab) to pure gray scale may result in visually changed results. As these effects differ from the "construction", the used BlendMode and color space of a PDF a general solution is not possible and excluding certain BlendModes depending on the input files is necessary.

  • RGBImage-R_eq_G_eq_B_is_Black_ExcludeBlendModes
  • RGBGraph-R_eq_G_eq_B_is_Black_ExcludeBlendModes
  • CMYKGraph-C_eq_M_eq_Y_is_Black_ExcludeBlendModes
  • CMYKImage-C_eq_M_eq_Y_is_Black_ExcludeBlendModes
  • LabGraph-a_eq_b_eq_0_is_Black_ExcludeBlendModes
  • LabImage-a_eq_b_eq_0_is_Black_ExcludeBlendModes

All BlendModes can be excluded, which means they are converted to a process color space. Normally the gray balance is preserved by converting it to grayscale, but this can result in a changed visual appearance with some special usage of certain BlendModes (e.g. ColorDodge).

Possible values are: Normal, Compatible, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color or Luminosity.
If more than one BlendMode shall be excluded, the values have to be separated either by a space, a comma or a semicolon.