SilColorImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last Edited by Ken Pier, August 2, 1985 11:37:53 am PDT
DIRECTORY
ImagerColor USING [ColorFromAtom, ColorFromRGB],
Rope USING [ROPE],
SilColor USING [CCharArray, ColorArray]
;
SilColorImpl: CEDAR PROGRAM IMPORTS ImagerColor EXPORTS SilColor = BEGIN
OPEN SilColor;
Sil colors are Neutral (black), Red, Yellow, Green, Cyan, Violet, Magenta, White, DarkBrown, Orange, Lime, Turquoise, Aqua, Ultaviolet, Pink, or Smoke respectively.
silCChars: PUBLIC CCharArray ← [ --maps color numbers to Sil colors. see SilDoc.tioga for colors
"N", "R", "Y", "G",
"C", "V", "M", "W",
"D", "O", "L", "T",
"A", "U", "P", "S"
];
defaultColorChar: PUBLIC Rope.ROPE ← silCChars[0];
colorOrder: PUBLIC Rope.ROPE ← "NRYGCVMWDOLTAUPS";
silColors: PUBLIC ColorArray ← [ --maps color numbers to Imager colors. see SilDoc.tioga for colors
ImagerColor.ColorFromAtom[$Black], -- Neutral (Black)
ImagerColor.ColorFromAtom[$Red], -- Red
ImagerColor.ColorFromAtom[$Yellow], -- Yellow
ImagerColor.ColorFromAtom[$Green], -- Green
ImagerColor.ColorFromAtom[$Cyan], -- Cyan
ImagerColor.ColorFromRGB[rgb: [R: 0.45, G: 0.25, B: 0.75]], -- Violet
ImagerColor.ColorFromAtom[$Magenta], -- Magenta
ImagerColor.ColorFromAtom[$White], -- White
ImagerColor.ColorFromRGB[rgb: [R: 0.25, G: 0.12, B: 0.08]], -- DarkBrown
ImagerColor.ColorFromAtom[$Orange], -- Orange
ImagerColor.ColorFromRGB[rgb: [R: 0.39, G: 0.75, B: 0.25]], -- Lime
ImagerColor.ColorFromRGB[rgb: [R: 0.42, G: 0.70, B: 0.92]], -- Turquoise
ImagerColor.ColorFromRGB[rgb: [R: 0.42, G: 0.92, B: 0.55]], -- Aqua
ImagerColor.ColorFromRGB[rgb: [R: 0.13, G: 0.0, B: 0.33]], -- Ultraviolet
ImagerColor.ColorFromAtom[$Pink], -- Pink
ImagerColor.ColorFromAtom[$Gray] -- Smoke
];
END.