Color Space and Color Operators

Model for Color Spaces and Colors

A color space is a coordinate system in terms of which a given color may be specified. A wide variety of color spaces are in common use. This clause defines the method by which documents select color spaces within which to specify colors, and the method by which a given color is then specified within a selected color space.

Colors are closely associated with the notion of ink described in . Imaging operators cause the currently selected color in the currently selected color space to be painted onto the page image as an ink..

SPDL provides a number of color spaces. An SPDL document can be assemble from PICTUREs constructed in many different color spaces. An application is not required to translate all color spaces to a single color space; instead, the application may simply describe the intended color space to SPDL using the wide collection of color spaces SPDL understands. This International Standard defines the ideal result of the presentation of an SPDL document. Conforming presentation processes need not produce this ideal result, but may instead produce a reasonable approximation subject to the limitations of the imaging technology. It is recognized that this is a subjective description.

Color Spaces and Color Space Families

Some color spaces, the device color spaces (DeviceGray, DeviceRGB, DeviceCMYK, DeviceKX), are directly related to their representation on an output device; other color spaces, the CIE and CIE-based color spaces, are related to human visual perception and are designed to be device independent. Certain special features such as named colors and mappings for indexed colors, are also modelled as color spaces, the special-purpose color spaces.

The color spaces are grouped into families of similar color spaces. Each family has been given a Public Object Identifier, the Color Space Familiy Identifier. A particular color space is identified by a combination of a Color Space Family Identifier and zero or more parameters that further select a particular color space within the identified family of color spaces.

SPDL documents select color spaces via execution of the SetColorSpace operator, which affects the contents of the CurrentColorSpace Graphics State Variable. The SetColorSpace operator takes as its operand an object reference to a Vector containing a Color Space Family Identifier and zero or more parameters appropriate to that color space family. This VectorReference is called a Color Space Object. There is no Color Space Object type in SPDL; rather the term is used as a convenient term to describe both (1) references to the particular objects of type Vector which are obtained via the FindResource operator and which represent a Color Space Family Identifier and the parameters associated with it and (2) the Vectors themselves. That is, the term Color Space Object will be used both for the VectorReference and the Vector; which is intended will be clear from context.

A Color Space Object is obtained via execution of the FindResource operator. This operator takes as its operand the value of an INTERNAL RESOURCE IDENTIFIER which is bound to a Color Space Object via a RESOURCE DECLARATION.

The semantics of the elements of Color Space Objects used to identify each standard color space to the SetColorSpace operator are defined in through .

Once a color space has been selected, particular colors within that color space are specified via execution of the SetColor operator; execution of this operator affects the contents of the CurrentColor Graphics State Variable. The operands to the SetColor operator are color components which specify a specific color within the current color space; the number and valid range of these operands varies according to the current color space. Whenever the SetColorSpace operator is excuted, the CurrentColor Graphics State Variable is initialized to a color that is defined as part of the color space that is being selected. Where possible, the default color is specified as either Black or the closest color to Black in the selected color space.

The required color components for specifying colors in each standard color space via execution of the SetColor operator are defined in through .

The following subclauses define each of the standard color spaces defined by SPDL, the semantics of the parameters required by the SetColorSpace operator for each color space, the semantics of the color components required by the SetColor operator to specify a color within each color space, and the value of the CurrentColor Graphics State Variable (as returned by the GetColor operator) immediately after execution of the SetColorSpace operator. In addition, the Object Name of the Public Object Identifier for each color space family defined in this International Standard is indicated; the Color Space Family Identifier that occurs within the Color Space Object is an OctetStringReference which references an OctetString that contains the canonical character string form of the full Public Identifier (see ).

CIE and CIE-based Color Spaces

CIE color spaces enable a document to specify color in a way that is related to human visual perception. A given CIE color specification should result in uniform results (given physical device limitations) across implementations. These are device independent color spaces. The CIE color spaces are:

The CIEBasedABC color space can be parameterized to form Calibrated RGB color spaces; see .

CIELAB

The CIELAB color space is equivalent to the CIE 1976 (L*a*b*)-space. The Object Name of the Public Object Identifier for this color space family is color-space-family::CIELAB. The Color Space Object for this color space has a single parmater:

  • <Dict: Dictionary> The contents of Dict are described in through .

    The color components required by the SetColor operator to specify a color in the CIELAB color space are

  • <b: Number>
  • <a: Number>
  • <L: Number> where the valid range for the value of L is 0 to 100 inclusive, and the valid ranges for the values of a and b shall be within the spectrum locus of the monochromatic stimuli.

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for this color space is

  • <0.0: Real>
  • <0.0: Real>
  • <0.0: Real>

    The mandatory and optional key/value pairs in Dict, and their semantics, are described below.

    WhitePoint

    The mandatory key/value pair <WhitePoint: VectorReference> references a 3-element Vector whose elements, of type Number, specify the CIE 1931 (XYZ)-space tristimulus value of the diffuse whte point. Each element shall have value greater than 0, and the Y component shall be equal to 1. The order of elements in the Vector is:

  • [ Xw 1 Zw]

    BlackPoint

    The optional key/value pair <BlackPoint: VectorReference> references a 3-element Vector whose elements, of type Number, specify the CIE 1931 (XYZ)-space tristimulus value of the diffuse black point. Each element shall have value greater than 0, and the order of elements in the Vector is:

  • [ Xb Yb Zb]

    If the BlackPoint key is not present, the default value used is:

  • [ 0 0 0 ]

    Range

    The mandatory key/value pair <Range: VectorReference> references a 6-element Vector whose elements, of type Number, specify the valid ranges of values for the L*, a*, and b* components of the color space. The elements of Range are interpreted as three pairs of bounds, one pair for each of the three color components:

  • [ L0 L1 a0 a1 b0 b1 ]

    The valid ranges of values for each of the three color components are then defined as L0L*L1, a0a*a1, and b0b*b1. The values of L0 and L1 shall be in the range 0 to 100 inclusive.

    CIELUV

    The CIELUV color space is equivalent to the CIE 1976 (L*u*v*)-space. The Object Name of the Public Object Identifier for this color space family is color-space-family::CIELUV. The Color Space Object for this color space has a single parameter:

  • <Dict: Dictionary> The contents of Dict are described in through .

    The color components required by the SetColor operator to specify a color in the CIELUV color space are

  • <v: Number>
  • <u: Number>
  • <L: Number> where the valid range of L is 0 to 100 inclusive, and the valid ranges for the values of u and v shall be within the spectrum locus of the monochromatic stimuli.

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for this color space is

  • <0.0: Real>
  • <0.0: Real>
  • <0.0: Real>

    The mandatory and optional key/value pairs in Dict, and their semantics, are described below.

    WhitePoint

    The mandatory key/value pair <WhitePoint: VectorReference> references a 3-element Vector whose elements, of type Number specify the CIE 1931 (XYZ)-space tristimulus value of the diffuse white point. Each element shall have a value greater than 0, and the Y component shall be equal to 1. The order of elements in the Vector is:

  • [ Xw 1 Zw]

    BlackPoint

    The optional key/value pair <BlackPoint: VectorReference> references a 3-element Vector whose elements, of type Number specify the CIE 1931 (XYZ)-space tristimulus value of the diffuse black point. Each element shall have a value greater than 0, and the order of elements in the Vector is:

  • [ Xb Yb Zb ]

    If the BlackPoint key is not present, the default value used is:

  • [ 0 0 0 ]

    Range

    The mandatory key/value pair <Range: VectorReference> references a 6-element Vector whose elements, of type Number, specify the valid ranges of values for the L*, u*, and v* components of the color space. The elements of Range are interpreted as three pairs of bounds, one pair for each of the three color components:

  • [ L0 L1 u0 u1 v0 v1 ]

    The valid ranges of values for each of the three color components are then defined as L0L*L1, u0u*u1, and v0v*v1. The values of L0 and L1 shall be in the range 0 to 100 inclusive.

    CIEBasedABC

    The CIEBasedABC color space models a simple zone theory of color vision, consisting of a non-linear trichromatic first stage combined with a non-linear opponent color second stage. One common use for this transformation of the CIE 1931 (XYZ) -space is to ensure that low-luminance colors in sampled raster graphics images are digitized with the minimum loss of fidelity. The three components of this color space, arbitrarily named A, B, and C, can represent any three orthogonal color components, depending on how the color space is parameterized. Among the more interesting color components which can be represented by the A, B, and C components of the CIEBasedABC color space are:

    • R, G, and B in a calibrated RGB space.
    • X, Y, and Z in the CIE 1931 (XYZ) -space.
    • Y, I, and Q in the NTSC space.
    • Y, U, and V in the SECAM and PAL spaces.

    The Object Name of the Public Object Identifier for this color space family is color-space-family::CIEbasedABC. The Color Space Object for this color space has a single parameter:

  • <Dict: Dictionary> The contents of Dict are described in through .

    The color components required by the SetColor operator to specify a color in the CIEBasedABC color space are

  • <C: Number>
  • <B: Number>
  • <A: Number>

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for this color space is

  • <0.0: Real>
  • <0.0: Real>
  • <0.0: Real> If the valid range of values for a color component does not include the value 0.0, the nearest value in the valid range is substituted as the default value for that color component.

    The mandatory and optional key/value pairs in Dict, and their semantics, are described in the subclauses below. With reference to those descriptions, the two-stage mapping from A, B, and C values to CIE 1931 (XYZ)-space is defined:

  • L = DA(A) × LA + DB(B) × LB + DC(C) × LC
  • M = DA(A) × MA + DB(B) × MB + DC(C) × MC
  • N = DA(A) × NA + DB(B) × NB + DC(C) × NC

  • X = DL(L) × XL + DM(M) × XM + DN(N) × XN
  • Y = DL(L) × YL + DM(M) × YM + DN(N) × YN
  • Z = DL(L) × ZL + DM(M) × ZM + DN(N) × ZN

    WhitePoint

    The mandatory key/value pair <WhitePoint: VectorReference> references a 3-element Vector whose elements, of type Number specify the CIE 1931 (XYZ)-space tristimulus value of the diffuse white point. Each element shall have a value greater than 0, and the Y component shall be equal to 1. The order of elements in the Vector is:

  • [ Xw 1 Zw ]

    BlackPoint

    The optional key/value pair <BlackPoint: VectorReference> references a 3-element Vector whose elements, of type Number specify the CIE 1931 (XYZ)-space tristimulus value of the diffuse black point. Each element shall have a value greater than or equal to 0, and the order of elements in the Vector is:

  • [ Xb Yb Zb ]

    If the BlackPoint key is not present, the default value used is:

  • [ 0 0 0 ]

    RangeABC

    The optional key/value pair <RangeABC: VectorReference> references a 6-element Vector whose elements, of type Number, specify the valid ranges of values for the A, B, and C components of the color space. The elements of RangeABC are interpreted as three pairs of bounds, one pair for each of the three color components:

  • [ A0 A1 B0 B1 C0 C1 ]

    The valid ranges of values for each of the three color components are then defined as

    A0AA1, B0BB1, and C0CC1.

    If the RangeABC key is not present, the default valid ranges are:

  • [ 0 1 0 1 0 1 ]

    DecodeABC

    The optional key/value pair <DecodeABC: VectorReference> references a 3-element Vector whose elements, of type Procedure, are Procedures that map ABC values into values which are linear with respect to the intermediate LMN representation. The order of the elements in the Vector is:

  • [ DA DB DC ]

    Each Procedure, DA , DB, DC, is called with the value of A, B, or C, respectively, as its operand and shall return the corresponding linear value. Since these Procedures are called at implementation-dependent times, they shall operate as pure functions —they should not depend on any non-default context and should not affect the current context.

    If the DecodeABC key is not present, the default value used is a reference to a Vector of null Procedures which do not affect the contents of the operand stack:

  • [ {} {} {} ]

    MatrixABC

    The optional key/value pair <MatrixABC: VectorReference> references a 9-element Vector whose elements, of type Number specify the linear interpretation of the decoded A, B, and C components of the color space with respect to the intermediate LMN representation. The order of the elements in the Vector is:

  • [ LA MA NA LB MB NB LC MC NC ]

    If the MatrixABC key is not present, the default matrix used is:

  • [ 1 0 0 0 1 0 0 0 1 ]

    RangeLMN

    The optional key/value pair <RangeLMN: VectorReference> references a 6-element Vector whose elements, of type Number, specify the valid ranges of values for the L, M, and N components of the intermediate representation. The elements of RangeLMN are interpreted as three pairs of bounds, one pair for each of the three color components:

  • [ L0 L1 M0 M1 N0 N1 ]

    The valid ranges of values for each of the three color components are then defined as

    L0LL1, M0MM1, and N0NN1.

    If the RangeLMN key is not present, the default valid ranges are:

  • [ 0 1 0 1 0 1 ]

    DecodeLMN

    The optional key/value pair <DecodeLMN: VectorReference> references a 3-element Vector whose elements, of type Procedure, are Procedures that map LMN values into values which are linear with respect to CIE 1931 (XYZ)-space. The order of the elements in the Vector is:

  • [ DL DM DN ]

    Each Procedure, DL, DM ,DN, is called with the value of L, M, or N, respectively, as its operand and shall return the corresponding linear value. Since these Procedures are called at implementation-dependent times, they shall operate as pure functions — they should not depend on any non-default context and should not affect the current context.

    If the DecodeLMN key is not present, the default value used is a reference to a Vector of null Procedures which do not affect the contents of the operand stack:

  • [ {} {} {} ]

    MatrixLMN

    The optional key/value pair <MatrixLMN: VectorReference> references a 9-element Vector whose elements, of type Number specify the linear interpretation of the decoded L, M, and N components of the intermediate LMN representation with respect to the CIE 1931 (XYZ)-space. The order of the elements in the Vector is:

  • [ XL YL ZL XM YM ZM XN YN ZN ]

    If the MatrixLMN key is not present, the default matrix used is:

  • [ 1 0 0 0 1 0 0 0 1 ]

    CIEBasedA

    The CIEBasedA color space is a one-dimensional CIEBased color space which is usually achromatic. Color values in this space have a single component, arbitrarily named A, which can represent a variety of color components, depending on how the CIEBasedA color space is parameterized. Among the more interesting color components which can be represented by the A component of the CIEBasedA color space are:

    • The gray component of a calibrated gray space.
    • The luminance Y component of the CIE 1931 (XYZ) -space.
    • The psychometric lightness L* component of the CIE 1976 (L*a*b*) -space.
    • The luminance Y component of the NTSC, SECAM, and PAL spaces.

    The Object Name of the Public Object Identifier for this color space family is color-space-family::CIEbasedA. The Color Space Object for this color space has a single parameter:

  • <Dict: Dictionary> The contents of Dict are described in through .

    The color component required by the SetColor operator to specify a color in the CIEBasedA color space is

  • <A: Number>

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for this color space is

  • <0.0: Real> If the valid range of values for the color component does not include the value 0.0, the nearest value in the valid range is substituted as the default value for the color component.

    The mandatory and optional key/value pairs in Dict, and their semantics, are described in the subclauses below. With reference to those descriptions, the two-stage mapping from A values to CIE 1931 (XYZ)-space is defined:

  • L = DA(A) × LA
  • M = DA(A) × MA
  • N = DA(A) × NA

  • X = DL(L) × XL + DM(M) × XM + DN(N) × XN
  • Y = DL(L) × YL + DM(M) × YM + DN(N) × YN
  • Z = DL(L) × ZL + DM(M) × ZM + DN(N) × ZN

    WhitePoint

    The mandatory key/value pair <WhitePoint: VectorReference> references a 3-element Vector whose elements, of type Number specify the CIE 1931 (XYZ)-space tristimulus value of the diffuse white point. Each element shall have a value greater than 0, and the Y component shall be equal to 1. The order of elements in the Vector is:

  • [ Xw 1 Zw ]

    BlackPoint

    The optional key/value pair <BlackPoint: VectorReference> references a 3-element Vector whose elements, of type Number specify the CIE 1931 (XYZ)-space tristimulus value of the diffuse black point. Each element shall have a value greater than 0, and the order of elements in the Vector is:

  • [ Xb Yb Zb ]

    If the BlackPoint key is not present, the default value used is:

  • [ 0 0 0 ]

    RangeA

    The optional key/value pair <RangeA: VectorReference> references a 2-element Vector whose elements, of type Number, specify the valid range of values for the A component of the color space. The elements of RangeA are interpreted as a pair of bounds:

  • [ A0 A1 ]

    The valid range of values for A is then defined as A0AA1. If the RangeA key is not present, the default valid range is:

  • [ 0 1 ]

    DecodeA

    The optional key/value pair <DecodeA: Procedure> is used to map A values into values which are linear with respect to the intermediate LMN representation. The Procedure is called with an A value as an operand and shall return the corresponding linear value. Since this Procedure is called at implementation-dependent times, it shall operate as a pure function — it should not depend on any non-default context and should not affect the current context.

    If the DecodeA key is not present, the default value used is a null Procedure which does not affect the contents of the operand stack.

    MatrixA

    The optional key/value pair <MatrixA: VectorReference> references a 3-element Vector whose elements, of type Number, specify the linear interpretation of the decoded A component of the color space with respect to the intermediate LMN representation. The order of the elements in the Vector is:

  • [ LA MA NA ]

    If the MatrixA key is not present, the default matrix used is:

  • [ 1 1 1 ]

    RangeLMN

    The optional key/value pair <RangeLMN: VectorReference> references a 6-element Vector whose elements, of type Number, specify the valid ranges of values for the L, M, and N components of the intermediate representation. The elements of RangeLMN are interpreted as three pairs of bounds, one pair for each of the three color components:

  • [ L0 L1 M0 M1 N0 N1 ]

    The valid ranges of values for each of the three color components are then defined as

    L0LL1, M0MM1, and N0NN1.

    If the RangeLMN key is not present, the default valid ranges are:

  • [ 0 1 0 1 0 1 ]

    DecodeLMN

    The optional key/value pair <DecodeLMN: VectorReference> references a 3-element Vector whose elements, of type Procedure, are Procedures that map LMN values into values which are linear with respect to CIE 1931 (XYZ)- space. The order of the elements in the Vector is:

  • [ DL DM DN ]

    Each Procedure, DL, DM, DN, is called with the value of L, M, or N, respectively, as its operand and shall return the corresponding linear value. Since these Procedures are called at implementation-dependent times, they shall operate as pure functions — they should not depend on any non-default context and should not affect the current context.

    If the DecodeLMN key is not present, the default value used is a Vector of null Procedures which do not affect the contents of the operand stack:

  • [ {} {} {} ]

    MatrixLMN

    The optional key/value pair <MatrixLMN: VectorReference > references a 9-element Vector whose elements, of type Number specify the linear interpretation of the decoded L, M, and N components of the intermediate LMN representation with respect to the CIE 1931 (XYZ)-space. The order of the elements in the Vector is:

  • [ XL YL ZL XM YM ZM XN YN ZN ]

    If the MatrixLMN key is not present, the default matrix used is:

  • [ 1 0 0 0 1 0 0 0 1 ]

    Device Color Spaces

    Device color spaces enable a document to specify color values that are directly related to their representation on an output device. Color values map directly (or via simple conversions) to the application of device colorants, i.e., quantities of physical dyes or intensities of phosphours. Due to the lack of calibration and therefore inherently implementation-specific nature of these color spaces, results may vary from implementation to implementation. The Device color spaces are:

    • DeviceRGB
    • DeviceCMYK
    • DeviceKX
    • DeviceGray

    DeviceRGB

    The DeviceRGB color space is an additive color model whose primaries are red, green, and blue. An additive color model is one in which the color components are primary colors which specify the spectral range in which light is emitted and the value of each component controls the strength of that emission, with 0.0 being no emission and 1.0 being a full emission.

    The Object Name of the Public Object Identifier for this color space family is color-space-family::DeviceRGB. The Color Space Object for this color space has no parameters:

    The color components required by the SetColor operator to specify a color in the DeviceRGB color space are

  • <B: Number>
  • <G: Number>
  • <R: Number>

    where the value of each component shall be between 0.0 and 1.0, where 0.0 represents no contribution from the given primary and 1.0 represents the maximum intensity of that primary.

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for this color space is

  • <0.0: Real>
  • <0.0: Real>
  • <0.0: Real>

    DeviceCMYK

    The DeviceCMYK color space is a subtractive color model whose primaries are cyan, magenta, yellow, and black. A subtractive color model is one in which the color components are primary colors which specify the spectral range in which light is absorbed and the value of each component controls the strength of the absorbtion, with 0.0 being no absorbtion and 1.0 being maximal absorbtion.

    The Object Name of the Public Object Identifier for this color space family is color-space-family::DeviceCMYK. The Color Space Object for this color space has no parameters:

    The color components required by the SetColor operator to specify a color in the DeviceCMYK color space are

  • <K: Number>
  • <Y: Number>
  • <M: Number>
  • <C: Number> where the value of each component shall be between 0.0 and 1.0, where 0.0 represents no light absorption by the given primary and 1.0 represents the maximum absorption by that primary.

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for this color space is

  • <1.0: Real>
  • <0.0: Real>
  • <0.0: Real>
  • <0.0: Real>

    DeviceKX

    The DeviceKX color space is a subtractive color model whose primaries are black and an unspecified highlight color. The Object Name of the Public Object Identifier for this color space family is color-space-family::DeviceKX. The Color Space Object for this color space has no parameters:

    The color components required by the SetColor operator to specify a color in the DeviceKX color space are

  • <K: Number>
  • <X: Number> where the value of each component shall be between 0.0 and 1.0, where 0.0 represents no light absorption by the given primary and 1.0 represents the maximum absorption by that primary.

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for this color space is

  • <1.0: Real>
  • <0.0: Real>

    DeviceGray

    The DeviceGray color space is an additive, one-dimensional color space in which gray values are specified. The Object Name of the Public Object Identifier for this color space family is color-space-family::DeviceGray. The Color Space Object for this color space has no parameters:

    The color component required by the SetColor operator to specify a color (level of gray) in the DeviceGray color space is

  • <Gray: Number> where the valid range of values of Gray is 0.0 to 1.0, with 0.0 used to represent black and 1.0 used to represent white.

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for this color space is

  • <0.0: Real>

    Special-Purpose Color Spaces

    Certain special features are also modelled as color spaces. These include color spaces for indexed color mapping and for named colors. The special-purpose color spaces are:

    • Indexed - Lookup-table to standardized color space mapping
    • NamedColor - Named colors
    There is one other special case for color spaces. The SetPatternColor operator installs a pattern dictionary as the current color and uses the value of the CurrentColorSpace Graphics State Variable as the underlying color space for the pattern.

    Indexed

    Many input and editing devices use private device-specific color lookup tables for reasons of efficiency; it is desirable to have a general method by which to specify the translation of these lookup, or index, values into colors in one of the standard color spaces. The Indexed color space provides a method for the mapping from small integers to arbitrary colors in any one of the standard color spaces, called the base color space.

    The Object Name of the Public Object Identifier for this color space family is color-space-family::Indexed. The Color Space Object for this color space has three parameters:

  • <Lookup: Procedure or OctetString>
  • <HighValue: Cardinal>
  • <BaseColorSpaceObject: VectorReference>

    The BaseColorSpaceObject parameter specifies the standard color space to which indices are to be mapped. It shall not be a special-purpose color space.

    The parameter HighValue is the upper bound of the index space. Thus, the valid range of values is 0 to HighValue.

    The final parameter, Lookup, is a color lookup which provides the mapping between the values of the indices and the colors of the base color space. If Lookup is of type OctetString, the length of the OctetString shall be m × (HighValue + 1), where m is the number of color components in the base color space. The semantics of Lookup as both a value of type Procedure and as a value of type OctetString are described below.

    The color component required by the SetColor operator to specify a color in the Indexed color space is

  • <Index: Number>

    If Index is of type Real, it is truncated to an Integer. If it is outside the range 0 to HighValue, the nearest value in the valid range is substituted for Index.

    Then, if Lookup was of type Procedure, the value of Index is pushed onto the operand stack and Lookup is called. Lookup shall translate the provided Index into a set of color components and shall return them on the operand stack in a form and order acceptable to the SetColor operator in the base color space. The SetColor operator then operates on the returned values as though in the base color space. Lookup should operate as a pure function with no side-effects, and it must be able to return color component values for any Index in the domain 0 to HighValue.

    Otherwise, if Lookup was of type OctetString, Index is multiplied by the number of color components in the base color space (hereafter referred to as NumComp for convenience) and the resultant value is used as an index into Lookup. The NumComp octets in Lookup starting at the position indicated by the multiplied Index are interpreted as coded values of type Cardinal for the NumComp color components of the base color space — the values are divided by 255 to yield component values in the range 0 to 1 inclusive. The SetColor operator then operates on the returned values as though in the base color space.

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for the Indexed color space is

  • <0: Integer>

    NamedColor

    It is sometimes useful to specify color by reference to an industry standard or private color specification. The NamedColor color space provides a generic mechanism for the specification of color in such a manner. The Object Name of the Public Object Identifier for this color space family is color-space-family::NamedColor. The Color Space Object for this color space has three parameters:

  • <TintToColor: Procedure>
  • <SelectColorSpace: Procedure>
  • <NamedColor: Identifier>

    The NamedColor parameter is the name of the private colorant, spot color, color separation, etc. If the presentation process is capable of using this NamedColor directly, the two Procedure parameters are ignored.

    If the presentation process is incapable of using the NamedColor directly, the SelectColorSpace parameter is executed to provide the specification of an arbitrary alternate color space to which tints of the NamedColor are to be mapped. This Procedure shall return on the operand stack the parameters and Color Space Family Identifier operand for the alternate color space, in a form and in an order acceptable to the SetColorSpace operator. The tints of the NamedColor requested via subsequent executions of the SetColor operator will be interpreted relative to this alternate color space via the TintToColor Procedure parameter, as described below.

    The color component required by the SetColor operator to specify a color in the NamedColor color space is

  • <Tint: Number> where the valid range of Tint is 0.0 to 1.0. A value of 0.0 represents the application of the minimum amount of colorant, a value of 1.0 represents the application of the maximum amount of colorant, and intermediate values represent the application of intermediate amounts of colorant.

    If the presentation process is incapable of using the NamedColor from the SetColorSpace operator directly, the value of Tint is pushed onto the operand stack and the Procedure TintToColor is called. TintToColor shall translate the provided Tint into a set of color components in the alternative color space provided by the SelectColorSpace parameter to the SetColorSpace operator. TintToColor shall return these color components on the operand stack in a form and order acceptable to the SetColor operator in the alternative color space. The SetColor operator then operates on the returned values as though in the alternative color space. TintToColor should operate as a pure function with no side-effects, and it shall be able to return color component values for any valid value of Tint.

    The value of the CurrentColor Graphics State Variable (as it would be returned by the GetColor operator) immediately after execution of the SetColorSpace operator for the NamedColor color space is

  • <1.0: Real>

    Operators

    The specification of these operators and their semantics includes the specification of conditions which may cause content exceptions to be raised as a result of interpretation of the operators. Content exceptions and exception handling are defined in . In addition to the operator-specific exceptions, there are generic exceptions which may be raised during the interpretation of almost any operator. These generic exceptions and their semantics are described in .

    SetColorSpace

    The SetColorSpace operator accepts the following operands:

  • <ColorSpaceObject: VectorReference> where ColorSpaceObject is obtained via execution of the FindResource operator. The order of the elements in ColorSpaceObject is such that, if the VectorLoad operator were executed with ColorSpaceObject as its operand, the following results would be returned on the operand stack:
  • <paramn: Any>
  • . . .
  • <param1: Any>
  • <ColorSpaceFamilyIdentifier: OctetStringReference> where ColorSpaceFamilyIdentifier is a reference to the OctetString which identifies the color space family being selected, and the remaining parameters are in the order specified by the appropriate subclause in through .

    The SetColorSpace operator returns no results. The effects of executing the SetColorSpace operator are:

    • Make the color space defined by ColorSpaceObject the current color space
    • Set the value of the CurrentColorSpace Graphics State Variable to ColorSpaceObject
    • Set the value of the CurrentColor Graphics State Variable to the appropriate value (see the appropriate subclause of through )

    If the Color Space Family Identifier is not known to the Content Processor, RaiseError shall be invoked with UndefinedKey as its operand. If parameter values are outside the valid range for the selected color space family, RaiseError shall be invoked with RangeCheck as its operand. If ColorSpace Object is not a reference to a Vector obtained via execution of the FindResource operator, RaiseError shall be invoked with UndefinedResource as its operand.

    GetColorSpace

    The GetColorSpace operator takes no operands and returns the value of the CurrentColorSpace Graphics State Variable.

    If the SetColorSpace operator has not yet been executed in the current context of execution, GetColorSpace returns the initial value of the CurrentColorSpace Graphics State Variable as specified in .

    SetColor

    The SetColor operator accepts the following operands:

  • <compn: Any>
  • . . .
  • <comp1: Any> where the number of and semantics of the color component operands are dependent upon the value of the CurrentColorSpace Graphics State Variable, and are described in the appropriate subclause of through . It returns no results. The effect of executing the SetColor operator is to set the value of the CurrentColor Graphics State Variable.

    If the wrong number and/or type of components are provided as operands, RaiseError shall be invoked with StackUnderflow or TypeCheck as its operand as appropriate to the error. If any component value is outside the valid range as defined in through , then the nearest value in the valid range will be substituted without any indication (Warning or Error).

    GetColor

    The GetColor operator takes no operands and returns the value of the CurrentColor Graphics State Variable in the form of a Mark value on the operand stack, followed by the operands to the last execution of the SetColor or SetPatternColor operator in the current context of execution, as they were presented to the SetColor or SetPatternColor operator on the operand stack.

    If neither the SetColor or SetPatternColor operator has been executed in the current context of execution or if SetColorSpace has been executed since the last execution of the above operators, GetColor returns the value of the CurrentColor Graphics State Variable relative to the current color space (see through ).

    SetOverPrint

    The SetOverPrint operator accepts a single operand

  • <OverPrint: Boolean> and returns no results. The effect of executing the SetOverPrint operator is to set the value of the CurrentOverPrint Graphics State Variable to the value of the OverPrint operand.

    Some SPDL implementations may be capable of producing separations. Separations are renderings of the page image in which there is a separate instance of the page image for each separation colorant. Each of the separations has only the portions of the page image that affect its given colorant. The seperation colorants may be primaries, such as Cyan, Magenta, Yellow and Black, or they may be other colorants producable by the presentation device. The latter class of colorants are called spot colors. With NamedColor color spaces, choosing the name of a separation colorant may restrict imaging into that particular separation. Whether or not separations are produced is outside the scope of this International Standard. The most common use for separations is to produce plates for a color printing press. The most common printing presses use four color separations, one for each of the inks: Cyan, Magenta, Yellow and Black. Such presses may be able to do spot colors with any ink, however. Alternatively, a spot color may be used as a highlight color on a color printer capable of rendering two colors.

    Since each separation is rendered separately, there is an option which is not available when the page image is rendered in a single step. When only some of the separations are selected for imaging, then there is an option as to what happens in the other separations, the separations into which imaging is not taking place. Following the normal rules of this International Standard, inks are opaque so the corresponding areas of the other separations should be erased when imaging occurs in the selected separations. This is what happens when the CurrentOverPrint Graphics State Variable is false. This is the default for this variable. When the CurrentOverPrint Graphics State Variable is true, however, the corresponding areas of the other separations are not erased. They are not changed in any way. This allows overprinting to occur. If separations are not being produced, then the CurrentOverPrint Graphics State Variable is ignored. Overprinting can be used to image traps (spreads and chokes) used to compensate for small misregistrations between pass of the printing press. Traps typically underlay dark colors with light colors to insure that unwanted white does not show through when the separations are misregistered relative to one another.

    GetOverPrint

    The GetOverPrint operator takes no operands and returns a single result

  • <OverPrint: Boolean> where OverPrint is the value of the CurrentOverPrint Graphics State Variable.