Output color definition via RGB values.
set_rgb sets the output color(s) resp. the greyvalues for region output for the active window. The colors are defined by their red, green and blue components. If only one combination is passed, all output takes place in that color. If a tuple is passed, region output and output of geometric objects takes place modulo the passed colors.
For every call of an output procedure, output is started with the first color. If only one object is displayed per call, it will always be displayed in the first color. This is even true for objects with multiple connection components. If multiple objects are displayed per procedure call, multiple colors are used. The defined colors are used until set_color, set_pixel, set_rgb or set_grey is called again. The defined colors are only valid for the active window, i.e. colors are not overwitten, if the active window is temporally switched. The values are used by procedures like disp_region, disp_line, disp_rectangle1, disp_rectangle2, disp_arrow, etc.
If a passed isn't available, an exception is raised. If set_check(::'~color':) was called before, HORUS uses a similar color and suppresses the error.
Red (input_control) |
integer-array -> integer |
red component of the color. | |
Default value: 255 | |
Range of values: 0 <= Red <= 255 | |
Restriction: (0 <= Red) && (Red <= 255) |
Green (input_control) |
integer-array -> integer |
green component of the color. | |
Default value: 0 | |
Range of values: 0 <= Green <= 255 | |
Restriction: (0 <= Green) && (Green <= 255) |
Blue (input_control) |
integer-array -> integer |
blue component of the color. | |
Default value: 0 | |
Range of values: 0 <= Blue <= 255 | |
Restriction: (0 <= Blue) && (Blue <= 255) |
set_rgb returns TRUE, if a window is active and all passed colors are available and displayable. Otherwise an exception is raised.