-- GraphicsColor.mesa -- Last edited by Maureen Stone July 1, 1982 1:55 pm -- Last edited by Doug Wyatt, August 30, 1982 3:38 pm -- Color definitions DIRECTORY GraphicsBasic USING [Color, black, white]; GraphicsColor: CEDAR DEFINITIONS = { Color: TYPE = GraphicsBasic.Color; -- Functional colors. red: Color = [r: 255, g: 0, b: 0]; green: Color = [r: 0, g: 255, b: 0]; blue: Color = [r: 0, g: 0, b: 255]; magenta: Color = [r: 255, g: 0, b: 255]; cyan: Color = [r: 0, g: 255, b: 255]; yellow: Color = [r: 255, g: 255, b: 0]; black: Color = GraphicsBasic.black; white: Color = GraphicsBasic.white; -- All REAL values below should be in the range [0..1]. -- HSV is hue, saturation, value; RGB is red, green, blue. IntensityToColor: PROC[intensity: REAL] RETURNS[Color]; HSVToColor: PROC[h, s, v: REAL] RETURNS[Color]; RGBToColor: PROC[r, g, b: REAL] RETURNS[Color]; -- The above 3 procedures will SIGNAL Runtime.BoundsFault for any argument -- not in [0..1]; resuming the signal will perform arg _ MAX[0,MIN[1,arg]]. ColorToIntensity: PROC[color: Color] RETURNS[intensity: REAL]; ColorToHSV: PROC[color: Color] RETURNS[h, s, v: REAL]; ColorToRGB: PROC[color: Color] RETURNS[r, g, b: REAL]; }. Κ½– "Mesa" style˜IprocšBΟcœœΟk œžœ(žœ žœœ­sœΟnœžœ žœžœ Ÿ œžœ žœžœ Ÿ œžœ žœžœ —œŸœžœžœ žœŸ œžœžœ žœŸ œžœžœ žœ˜΄ —…—Άy