CNSColor.mesa
Written by Darlene Plebon on June 23, 1983 11:36 am
Last Edited by: Stone, July 1, 1983 4:48 pm
DIRECTORY
Rope USING [ROPE];
CNSColor: CEDAR DEFINITIONS
=
BEGIN OPEN CNSColor;
CSLChroma: TYPE = [-1..30];
CSLSaturation: TYPE = [0..4];
CSLLightness: TYPE = [0..6];
achromatic:   CSLChroma = -1;
red:     CSLChroma = 0;
orangishRed:   CSLChroma = 1;
redOrange:    CSLChroma = 2;
reddishOrange:   CSLChroma = 3;
orange:     CSLChroma = 4;
yellowishOrange:  CSLChroma = 5;
orangeYellow:   CSLChroma = 6;
orangishYellow:   CSLChroma = 7;
yellow:     CSLChroma = 8;
greenishYellow:   CSLChroma = 9;
yellowGreen:   CSLChroma = 10;
yellowishGreen:  CSLChroma = 11;
green:     CSLChroma = 12;
bluishGreen:   CSLChroma = 13;
greenBlue:    CSLChroma = 14;
greenishBlue:   CSLChroma = 15;
blue:      CSLChroma = 16;
purplishBlue:   CSLChroma = 17;
bluePurple:    CSLChroma = 18;
bluishPurple:   CSLChroma = 19;
purple:     CSLChroma = 20;
reddishPurple:   CSLChroma = 21;
purpleRed:    CSLChroma = 22;
purplishRed:   CSLChroma = 23;
brownishRed:  CSLChroma = 24;
redBrown:   CSLChroma = 25;
reddishBrown:  CSLChroma = 26;
brown:    CSLChroma = 27;
yellowishBrown:  CSLChroma = 28;
brownYellow:  CSLChroma = 29;
brownishYellow:  CSLChroma = 30;
noSaturation:  CSLSaturation = 0;
grayish:    CSLSaturation = 1;
moderate:   CSLSaturation = 2;
strong:    CSLSaturation = 3;
vivid:    CSLSaturation = 4;
black:   CSLLightness = 0;
veryDark:  CSLLightness = 1;
dark:    CSLLightness = 2;
medium:   CSLLightness = 3;
light:    CSLLightness = 4;
veryLight:  CSLLightness = 5;
white:   CSLLightness = 6;
CNSToCSL: PUBLIC PROCEDURE [hue, saturation, lightness: Rope.ROPE] RETURNS [c: CSLChroma, s: CSLSaturation, l: CSLLightness];
CSLToHSL: PUBLIC PROCEDURE [c: CSLChroma, s: CSLSaturation, l: CSLLightness] RETURNS [hue, saturation, lightness: REAL];
HSLToCSL: PUBLIC PROCEDURE [hue, saturation, lightness: REAL] RETURNS [c: CSLChroma, s: CSLSaturation, l: CSLLightness];
CSLToCNS: PUBLIC PROCEDURE [c: CSLChroma, s: CSLSaturation, l: CSLLightness] RETURNS [hue, saturation, lightness: Rope.ROPE];
END.