Previous Next


                                                287
           SECTION 4.5                                                              Color Spaces




                                    TABLE 4.24 Color operators
OPERANDS      OPERATOR   DESCRIPTION

name          CS         (PDF 1.1) Set the current color space to use for stroking operations. The operand
                         name must be a name object. If the color space is one that can be specified by a
                         name and no additional parameters (DeviceGray, DeviceRGB, DeviceCMYK, and
                         certain cases of Pattern), the name may be specified directly. Otherwise, it must
                         be a name defined in the ColorSpace subdictionary of the current resource dic-
                         tionary (see Section 3.7.2, “Resource Dictionaries”); the associated value is an
                         array describing the color space (see Section 4.5.2, “Color Space Families”).
                         Note: The names DeviceGray, DeviceRGB, DeviceCMYK, and Pattern always iden-
                         tify the corresponding color spaces directly; they never refer to resources in the
                         ColorSpace subdictionary.

                         The CS operator also sets the current stroking color to its initial value, which de-
                         pends on the color space:
                         • In a DeviceGray, DeviceRGB, CalGray, or CalRGB color space, the initial color
                           has all components equal to 0.0.
                         • In a DeviceCMYK color space, the initial color is [ 0.0 0.0 0.0 1.0 ].
                         • In a Lab or ICCBased color space, the initial color has all components equal to
                           0.0 unless that falls outside the intervals specified by the space’s Range entry,
                           in which case the nearest valid value is substituted.
                         • In an Indexed color space, the initial color value is 0.
                         • In a Separation or DeviceN color space, the initial tint value is 1.0 for all colo-
                           rants.
                         • In a Pattern color space, the initial color is a pattern object that causes nothing
                           to be painted.

name          cs         (PDF 1.1) Same as CS but used for nonstroking operations.

c1 … c
       n
              SC         (PDF 1.1) Set the color to use for stroking operations in a device, CIE-based
                         (other than ICCBased), or Indexed color space. The number of operands re-
                         quired and their interpretation depends on the current stroking color space:
                         • For DeviceGray, CalGray, and Indexed color spaces, one operand is required
                           (n = 1).
                         • For DeviceRGB, CalRGB, and Lab color spaces, three operands are required
                           (n = 3).
                         • For DeviceCMYK, four operands are required (n = 4).

Previous Next