DIRECTORY ImagerColor USING [RGB, YES]; ColorTypes: CEDAR DEFINITIONS ~ BEGIN RGB: TYPE ~ ImagerColor.RGB; -- RECORD [R, G, B: REAL] HSV: TYPE ~ RECORD [H, S, V: REAL]; HSL: TYPE ~ RECORD [H, S, L: REAL]; YIQ: TYPE ~ RECORD [Y, I, Q: REAL]; YES: TYPE ~ ImagerColor.YES; -- RECORD [Y, E, S: REAL]; 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]; CMY: TYPE ~ RECORD [C, M, Y: REAL]; END. | 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 In a perfect world, this dependency would not exist: ImagerColor should include me, not the other way around. Computer Graphics Models: HSV, HSL Red, green, and blue, as for a color monitor or scanner; R, G, and B range from 0 to 1. 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. 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 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. 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. CIELAB L*C*h* chromaticity coordinates Printer-Oriented Models Cyan, Magenta, Yellow, for a color printer. C, M, Y range from 0 to 1 Κf•NewlineDelimiter –(cedarcode) style™code™Kšœ ΟeœC™NK™(K™-K™&K™,K™—šΟk ˜ šœ žœžœžœ˜K™m——K˜KšΟn œžœž œž˜%head™"• CharPropsg(Postfix0 1 .3 textColorPostfix1 3 .div 1 .3 textColorPostfix2 3 .div 1 .3 textColorš žœžœžœΟcžœ žœ˜6K–ePostfix0 1 .3 textColorPostfix1 3 .div 1 .3 textColorPostfix2 3 .div 1 .3 textColorCšœW™WK˜—šžœžœžœ žœ˜#Kšœ6™6IprocšœN™NMšœB™BK˜—šžœžœžœ žœ˜#Kšœ:™:Mšœ5 œ'™]Mšœ\™\K˜——™(™@K™tK™iK™—šžœžœžœ žœ˜#KšœS™SK™E™3K™S—K™JKšœ™K™—š žœžœžœ žœ žœ˜7K™AK™;™3K™S—K™JKšœ™K™——™K™ˆ™ Ibody™N™N™—™CN™ —™ N™N™N™—™CN™ —N™΅™K™—Kšžœžœžœ žœ˜#Kšœžœžœ žœ˜#Icode2šžœžœžœžœ˜2Ošžœžœžœžœ˜2šœžœžœžœ˜0O™&——™šžœžœžœ žœ˜#KšœF™FK™——K˜Kšžœ˜—…—6