ColorNames.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Written by Maureen Stone on October 11, 1983 5:01 pm
Last Edited by: Ken Pier, January 18, 1984 12:52 pm
Last Edited by: Frank Crow, May 22, 1984 1:41:57 pm PDT
DIRECTORY
Rope USING [ROPE];
ColorNames: CEDAR DEFINITIONS =
BEGIN
UndefinedName: SIGNAL;
BadGrammar: SIGNAL;
ColorType: TYPE = {
black, white, gray, grey,
red, orange, brown, yellow, green, cyan, blue, purple, magenta,
achromatic, weak, moderate, strong, vivid, bright,
dark, medium, light
};
ParseColorName: PUBLIC PROCEDURE [rope: Rope.ROPE] RETURNS [h,s,l: REAL];
Color naming system.
The hope is that this will be a set of "intuitive" descriptive names that people could type or select. A color name is composed of three properties, usually presented in order: lightness, saturation, hue. The current set of names for these properties is:
Lightness is one of: dark, medium, light (default is medium)
Saturation is one of: weak, moderate, strong, vivid, bright (default is strong, bright = vivid)
Hue is one of: red, orange, brown, yellow, green, cyan, blue, purple, magenta, brown
You may also interpolate between the hue names as follows: red, orangish-red, red-orange, reddish-orange, orange... You may only interpolate between nearby hues as defined in this list.
There are three more hue names for achromatic colors: black, white and gray (grey).
Black and white are complete descriptions by themselves.
Gray may have a lighness parameter.
Colors, saturation, and lightnesses may be used as qualifiers. Each successive use causes a smaller incremental change. The qualifier, "very" may be used, in general. Its effect is to reapply the last name. The suffix "ish" may be used most of the time (all colors plus "dark", "light", "weak" and "strong"); it serves to weaken the effect of the qualifier by a third. Examples:
 Dark Dark Purple, Lightish Very Dark Blue, Strong Light Brown, Vivid Red
HSLToRope: PUBLIC PROCEDURE [h,s,l: REAL, level: NAT ← 3] RETURNS [rope: Rope.ROPE];
Returns a limited set of names corresponding to a discretized color space
END.