ColorTypes.mesa
Copyright Ó 1985, 1986, 1987, 1992 by Xerox Corporation. All rights reserved.
Stone, December 18, 1986 11:51:22 am PST
Michael Plass, January 8, 1987 9:37:26 am PST
Doug Wyatt, April 10, 1992 4:19 pm PDT
Ken Fishkin, September 11, 1992 12:31 pm PDT
DIRECTORY
ImagerColor USING [RGB, YES];
In a perfect world, this dependency would not exist: ImagerColor should include me, not the other way around.
ColorTypes: CEDAR DEFINITIONS ~ BEGIN
Computer Graphics Models: HSV, HSL
RGB: TYPE ~ ImagerColor.RGB; -- RECORD [R, G, B: REAL]
Red, green, and blue, as for a color monitor or scanner; R, G, and B range from 0 to 1.
HSV: TYPE ~ RECORD [H, S, V: REAL];
Hue, Saturation, Value; H, S, and V range from 0 to 1.
If V=0 (black), H and S are irrelevant. If S=0 (achromatic), H is irrelevant.
The HSV space is a hexcone; see Foley and van Dam, section 17.4.4.
HSL: TYPE ~ RECORD [H, S, L: REAL];
Hue, Saturation, Lightness; H, S, and L range from 0 to 1.
If L=0 (black) or L=1 (white), H and S are irrelevant. If S=0 (achromatic), H is irrelevant.
The HSL space is a double hexcone; see Foley and van Dam, section 17.4.5 (they call it HLS).
Achromatic/Chromatic Models, YIQ and YES
The following two transformations have the following properties:
1. The variable Y contains all the achromatic information, so achromatic devices can ignore the other two variables
2. If R, G, B are standard colors, then Y is luminance (see ImagerCalibratedColor for more on luminance)
YIQ: TYPE ~ RECORD [Y, I, Q: REAL];
YIQ is the scheme used for color television; see Foley and van Dam, section 17.4.3.
Y = .30*R+.59*G+.11*B; I = .60*R-.28*G-.32*B; Q = .21*R-.52*G+.31*B
IF the chromaticities of the R, G, B phosphors are:
red: [x: 0.630, y: 0.340], green: [x: 0.310, y: 0.595], blue: [x: 0.155, y: 0.070],
AND the white point is D6500: [x: 0.3127, y: 0.3291], then Y is luminance.
Y, I, and Q range from 0 to 1.
YES: TYPE ~ ImagerColor.YES; -- RECORD [Y, E, S: REAL];
A color difference function defined for the Xerox Color Standard.
Y=0.253R+0.685G+0.063B; E = 0.5R-0.5G; S = 0.25R+0.25G-0.5B
IF the chromaticities of the R, G, B phosphors are:
red: [x: 0.630, y: 0.340], green: [x: 0.310, y: 0.595], blue: [x: 0.155, y: 0.070],
AND the white point is D5000: [x: 0.3457, y: 0.3587], then Y is luminance.
Y, E, and S range from 0 to 1.
XYZ and descendants therefrom.
XYZ is the "canonical" 1931 CIE color space.
CIELAB is a perceptual mashing of XYZ in which equal distance in CIELAB space correspond, more or less, to equal perceptual differences.
CIELUV is like CIELAB, but with a slightly different formula.
Yxy is derived from XYZ by x = X/(X+Y+Z), y = Y/(X + Y + Z).
XeroxRGB/NTSCRGB are RGB spaces with different chromaticies for the standard primaries:
For XeroxRGB:
Standard Red x=0.630 y=0.340
Standard Green x=0.310 y=0.595
Standard Blue x=0.155 y=0.070
The white point is CIE Standard Illuminant D50 with chromaticities:
Standard White x=0.3457 y=0.3586
for NTSCRGB
Standard Red x=0.67 y=0.33
Standard Green x=0.21 y=0.71
Standard Blue x=0.14 y=0.08
The white point is CIE Standard Illuminant D50 with chromaticities:
Standard White x=0.3101 y=0.3162
These transformations assume true tristimulus values. In practice, the conversion from NTSC/RGB to NTSC/YIQ uses gamma-corrected R,G,B signals rather than R,G,B tristimulus values.
XYZ: TYPE ~ RECORD [X, Y, Z: REAL];
Yxy: TYPE ~ RECORD [Y, x, y: REAL];
CIELAB: TYPE ~ RECORD [lStar, aStar, bStar: REAL];
CIELUV: TYPE ~ RECORD [lStar, uStar, vStar: REAL];
LCh: TYPE ~ RECORD [lStar, cStar, hStar: REAL];
CIELAB L*C*h* chromaticity coordinates
Printer-Oriented Models
CMY: TYPE ~ RECORD [C, M, Y: REAL];
Cyan, Magenta, Yellow, for a color printer. C, M, Y range from 0 to 1
END.