GET-COLOR [PRINT-TEXT-FOREGROUND=({color_name_var})] [PRINT-TEXT-BACKGROUND=({color_name_var})] [PRINT-PAGE-BACKGROUND=({color_name_var})] [LINE-COLOR=({color_name_var})] [FILL-COLOR=({color_name_var})]
Color in which the text prints.
Background color behind the text.
Line color used in DRAW and PRINT BOX.
Fill color used in DRAW (TYPE=BOX) and PRINT BOX.
Text variable that receives the name of the specified color.
GET-COLOR is allowed wherever PRINT or DRAW is allowed. It is used to retrieve certain attributes of PRINT and DRAW. If the requested attribute does not map to a defined color name, then the name is returned as RGBredgreenblue, where each component is a three digit number. For example, RGB127133033. You can use this format wherever you use a color name. The color name 'none' is returned if no color is associated with the requested attribute.
begin-setup
lighter_unknown = (93,122,129)
set-color print-text-foreground=('lighter_unknown')
get-color print-text-foreground=($print-foreground)
print $print-foreground (+2,7)
end-setup
begin-program
alter-color-map name = 'light_blue' value = (193, 233, 230)
print 'Yellow Submarine' ()
foreground = ('yellow')
background = ('light_blue')
get-color print-text-foreground = ($print-foreground)
set-color print-text-foreground = ('purple')
print 'Barney' (+1,1)
set-color print-text-foreground = ($print-foreground)
end-program
begin-program
get-color line-color=($line-color)
set-color line-color=('purple')
draw (5,5) type='horz-line' width=10
set-color line-color=($line-color)
end-program