Next: , Previous: , Up: Color   [Contents][Index]


5.11.2 Color Spaces

Measurement-based Color Spaces

The tristimulus color spaces are those whose component values are proportional measurements of light intensity. The CIEXYZ(1931) system provides 3 sets of spectra to dot-product with a spectrum of interest. The result of those dot-products is coordinates in CIEXYZ space. All tristimuls color spaces are related to CIEXYZ by linear transforms, namely matrix multiplication. Of the color spaces listed here, CIEXYZ and RGB709 are tristimulus spaces.

Color Space: CIEXYZ

The CIEXYZ color space covers the full gamut. It is the basis for color-space conversions.

CIEXYZ is a list of three inexact numbers between 0.0 and 1.1. ’(0. 0. 0.) is black; ’(1. 1. 1.) is white.

Function: ciexyz->color xyz

xyz must be a list of 3 numbers. If xyz is valid CIEXYZ coordinates, then ciexyz->color returns the color specified by xyz; otherwise returns #f.

Function: color:ciexyz x y z

Returns the CIEXYZ color composed of x, y, z. If the coordinates do not encode a valid CIEXYZ color, then an error is signaled.

Function: color->ciexyz color

Returns the list of 3 numbers encoding color in CIEXYZ.

Color Space: RGB709

BT.709-4 (03/00) Parameter values for the HDTV standards for production and international programme exchange specifies parameter values for chromaticity, sampling, signal format, frame rates, etc., of high definition television signals.

An RGB709 color is represented by a list of three inexact numbers between 0.0 and 1.0. ’(0. 0. 0.) is black ’(1. 1. 1.) is white.

Function: rgb709->color rgb

rgb must be a list of 3 numbers. If rgb is valid RGB709 coordinates, then rgb709->color returns the color specified by rgb; otherwise returns #f.

Function: color:rgb709 r g b

Returns the RGB709 color composed of r, g, b. If the coordinates do not encode a valid RGB709 color, then an error is signaled.

Function: color->rgb709 color

Returns the list of 3 numbers encoding color in RGB709.

Perceptual Uniformity

Although properly encoding the chromaticity, tristimulus spaces do not match the logarithmic response of human visual systems to intensity. Minimum detectable differences between colors correspond to a smaller range of distances (6:1) in the L*a*b* and L*u*v* spaces than in tristimulus spaces (80:1). For this reason, color distances are computed in L*a*b* (or L*C*h).

Color Space: L*a*b*

Is a CIE color space which better matches the human visual system’s perception of color. It is a list of three numbers:

Function: l*a*b*->color L*a*b* white-point

L*a*b* must be a list of 3 numbers. If L*a*b* is valid L*a*b* coordinates, then l*a*b*->color returns the color specified by L*a*b*; otherwise returns #f.

Function: color:l*a*b* L* a* b* white-point

Returns the L*a*b* color composed of L*, a*, b* with white-point.

Function: color:l*a*b* L* a* b*

Returns the L*a*b* color composed of L*, a*, b*. If the coordinates do not encode a valid L*a*b* color, then an error is signaled.

Function: color->l*a*b* color white-point

Returns the list of 3 numbers encoding color in L*a*b* with white-point.

Function: color->l*a*b* color

Returns the list of 3 numbers encoding color in L*a*b*.

Color Space: L*u*v*

Is another CIE encoding designed to better match the human visual system’s perception of color.

Function: l*u*v*->color L*u*v* white-point

L*u*v* must be a list of 3 numbers. If L*u*v* is valid L*u*v* coordinates, then l*u*v*->color returns the color specified by L*u*v*; otherwise returns #f.

Function: color:l*u*v* L* u* v* white-point

Returns the L*u*v* color composed of L*, u*, v* with white-point.

Function: color:l*u*v* L* u* v*

Returns the L*u*v* color composed of L*, u*, v*. If the coordinates do not encode a valid L*u*v* color, then an error is signaled.

Function: color->l*u*v* color white-point

Returns the list of 3 numbers encoding color in L*u*v* with white-point.

Function: color->l*u*v* color

Returns the list of 3 numbers encoding color in L*u*v*.

Cylindrical Coordinates

HSL (Hue Saturation Lightness), HSV (Hue Saturation Value), HSI (Hue Saturation Intensity) and HCI (Hue Chroma Intensity) are cylindrical color spaces (with angle hue). But these spaces are all defined in terms device-dependent RGB spaces.

One might wonder if there is some fundamental reason why intuitive specification of color must be device-dependent. But take heart! A cylindrical system can be based on L*a*b* and is used for predicting how close colors seem to observers.

Color Space: L*C*h

Expresses the *a and b* of L*a*b* in polar coordinates. It is a list of three numbers:

The colors by quadrant of h are:

0red, orange, yellow90
90yellow, yellow-green, green180
180green, cyan (blue-green), blue270
270blue, purple, magenta360
Function: l*c*h->color L*C*h white-point

L*C*h must be a list of 3 numbers. If L*C*h is valid L*C*h coordinates, then l*c*h->color returns the color specified by L*C*h; otherwise returns #f.

Function: color:l*c*h L* C* h white-point

Returns the L*C*h color composed of L*, C*, h with white-point.

Function: color:l*c*h L* C* h

Returns the L*C*h color composed of L*, C*, h. If the coordinates do not encode a valid L*C*h color, then an error is signaled.

Function: color->l*c*h color white-point

Returns the list of 3 numbers encoding color in L*C*h with white-point.

Function: color->l*c*h color

Returns the list of 3 numbers encoding color in L*C*h.

Digital Color Spaces

The color spaces discussed so far are impractical for image data because of numerical precision and computational requirements. In 1998 the IEC adopted A Standard Default Color Space for the Internet - sRGB (http://www.w3.org/Graphics/Color/sRGB). sRGB was cleverly designed to employ the 24-bit (256x256x256) color encoding already in widespread use; and the 2.2 gamma intrinsic to CRT monitors.

Conversion from CIEXYZ to digital (sRGB) color spaces is accomplished by conversion first to a RGB709 tristimulus space with D65 white-point; then each coordinate is individually subjected to the same non-linear mapping. Inverse operations in the reverse order create the inverse transform.

Color Space: sRGB

Is "A Standard Default Color Space for the Internet". Most display monitors will work fairly well with sRGB directly. Systems using ICC profiles 6 should work very well with sRGB.

Function: srgb->color rgb

rgb must be a list of 3 numbers. If rgb is valid sRGB coordinates, then srgb->color returns the color specified by rgb; otherwise returns #f.

Function: color:srgb r g b

Returns the sRGB color composed of r, g, b. If the coordinates do not encode a valid sRGB color, then an error is signaled.

Color Space: xRGB

Represents the equivalent sRGB color with a single 24-bit integer. The most significant 8 bits encode red, the middle 8 bits blue, and the least significant 8 bits green.

Function: color->srgb color

Returns the list of 3 integers encoding color in sRGB.

Function: color->xrgb color

Returns the 24-bit integer encoding color in sRGB.

Function: xrgb->color k

Returns the sRGB color composed of the 24-bit integer k.

Color Space: e-sRGB

Is "Photography - Electronic still picture imaging - Extended sRGB color encoding" (PIMA 7667:2001). It extends the gamut of sRGB; and its higher precision numbers provide a larger dynamic range.

A triplet of integers represent e-sRGB colors. Three precisions are supported:

e-sRGB10

0 to 1023

e-sRGB12

0 to 4095

e-sRGB16

0 to 65535

Function: e-srgb->color precision rgb

precision must be the integer 10, 12, or 16. rgb must be a list of 3 numbers. If rgb is valid e-sRGB coordinates, then e-srgb->color returns the color specified by rgb; otherwise returns #f.

Function: color:e-srgb 10 r g b

Returns the e-sRGB10 color composed of integers r, g, b.

Function: color:e-srgb 12 r g b

Returns the e-sRGB12 color composed of integers r, g, b.

Function: color:e-srgb 16 r g b

Returns the e-sRGB16 color composed of integers r, g, b. If the coordinates do not encode a valid e-sRGB color, then an error is signaled.

Function: color->e-srgb precision color

precision must be the integer 10, 12, or 16. color->e-srgb returns the list of 3 integers encoding color in sRGB10, sRGB12, or sRGB16.


Footnotes

(6)

A comprehensive encoding of transforms between CIEXYZ and device color spaces is the International Color Consortium profile format, ICC.1:1998-09:

The intent of this format is to provide a cross-platform device profile format. Such device profiles can be used to translate color data created on one device into another device’s native color space.


Next: , Previous: , Up: Color   [Contents][Index]