[cairo] Spot colors (and CMYK)
spitzak at gmail.com
Tue Feb 16 10:20:52 PST 2010
Kai-Uwe Behrmann wrote:
> Am 13.02.10, 05:29 +0100 schrieb ecir hana:
>> just a quick one: what do you think should happen when you have one
>> surface in duotone (or CMYK or any other non-3D space, as Bill Spitzak
>> calls them) and you want to paint it over (copy, multiply) 3D color
>> space? In other words, what do you think, who should do the conversion
>> - Cairo or the application? But perhaps you, or someone else, see
>> another possibility?
> I guess the input would be all sRGB. But for integer output the colour
> space should be selectable. Otherwise the sRGB input API would remain a
> bottleneck for saturated colours.
It is true that a lot of Cairo implementations are going to clamp
saturated colors to 0-1 *before* compositing rather than clamp the final
result. This will produce a different result.
However I feel this problem can be safely ignored, in particular because
partially transparent compositing of the negative values do not produce
useful results anyway (fixing this would require linear math for the
compositing, which is unacceptable as it will change the appearance of
normal overlays such as partial transparency and defeat the useful gamma
artifacts of sRGB that make negatives look correct to human vision).
I do not think there is going to be any interest in anything other than
two outputs from any Cairo device:
1. Produce the sRGB result as accurately as possible on the output
device using whatever information is available about it such as color
2. "raw", use the sRGB results to directly drive 3 color primaries that
the device can do, such that clamped numbers cover the gamut of the device.
For an awful lot of Cairo back ends these two modes are identical. When
they are not identical, the second version is needed so that output can
be matched with other software. I am not sure which mode should be the
default, it may vary depending on the device.
Any other mode would involve simulating one device on another and I do
not think should be Cairo's responsibility. The application can choose
the correct sRGB values to match the other device and use the first
mode, or it can learn the necessary information about both devices and
use the second mode.
More information about the cairo