FLcolor

FLcolor — A FLTK opcode that sets the primary colors.

Description

Plugin opcode in widgets. This opcode is part of the plugin repository and has to be installed separately. These FLTK widgets do not work on the Mac. The plugin repository can be found here: https://github.com/csound/plugins

Sets the primary colors to RGB values given by the user.

Syntax

FLcolor ired, igreen, iblue [, ired2, igreen2, iblue2]

Initialization

ired -- The red color of the target widget. The range for each RGB component is 0-255

igreen -- The green color of the target widget. The range for each RGB component is 0-255

iblue -- The blue color of the target widget. The range for each RGB component is 0-255

ired2 -- The red component for the secondary color of the target widget. The range for each RGB component is 0-255

igreen2 -- The green component for the secondary color of the target widget. The range for each RGB component is 0-255

iblue2 -- The blue component for the secondary color of the target widget. The range for each RGB component is 0-255

Performance

These opcodes modify the appearance of other widgets. There are two types of such opcodes, those that do not contain the ihandle argument which affect all subsequently declared widgets, and those with ihandle which affect only a target widget previously defined.

FLcolor sets the primary colors to RGB values given by the user. This opcode affects the primary color of (almost) all widgets defined next its location. User can put several instances of FLcolor in front of each widget he intend to modify. However, to modify a single widget, it would be better to use the opcode belonging to the second type (i.e. those containing ihandle argument).

FLcolor is designed to modify the colors of a group of related widgets that assume the same color. The influence of FLcolor on subsequent widgets can be turned off by using -1 as the only argument of the opcode. Also, using -2 (or -3) as the only value of FLcolor makes all next widget colors randomly selected. The difference is that -2 selects a light random color, while -3 selects a dark random color.

Using ired2, igreen2, iblue2 is equivalent to using a separate FLcolor2.

See Also

FLcolor2, FLhide, FLlabel, FLsetAlign, FLsetBox, FLsetColor, FLsetColor2, FLsetFont, FLsetPosition, FLsetSize, FLsetText, FLsetTextColor, FLsetTextSize, FLsetTextType, FLsetVal_i, FLsetVal, FLshow

Credits

Author: Gabriel Maldonado

New in version 4.22