SECTION 4.5
281
Color Spaces
Given a formula for converting any combination of black and gold tints to cali-
brated
RGB,
a 2-in, 3-out type 4 (PostScript calculator) function could be used for
the tint transformation. Alternatively, a type 0 (sampled) function could be used,
but this would require a large number of sample points to represent the function
accurately; for example, sampling each input variable for 256 tint values between
0.0 and 1.0 would require 256
2
=
65,536 samples. But since the
DeviceN
color
space is being used as the base of an
Indexed
color space, there are actually only
256 possible combinations of black and gold tint values. A more compact way to
represent this information is to put the alternate color values directly into the
lookup table alongside the
DeviceN
color values, as in Example 4.19.
Example 4.19
10 0 obj
% Color space
[ /Indexed
[ /DeviceN
[ /Black /Gold /None /None /None ]
[ /CalRGB
<< /WhitePoint [ 1.0 1.0 1.0 ]
/Gamma [ 2.2 2.2 2.2 ]
>>
]
20 0 R
% Tint transformation function
]
255
… Lookup table …
]
endobj
In this example, each entry in the lookup table has
five
components: two for the
black and gold colorants and three more (specified as
None
) for the equivalent
CalRGB
color components. If the black and gold colorants are available on the
output device, the
None
components are ignored; if black and gold are not
available, the tint transformation function is used to convert a five-component
color into a three-component equivalent in the alternate
CalRGB
color space.
But because, by construction, the third, fourth, and fifth components
are
the
CalRGB
components, the tint transformation function can merely discard the
first two components and return the last three. This can be easily expressed
with a type 4 (PostScript calculator) function, as shown in Example 4.20.