FLcolor
Prev | Orchestra Opcodes and Operators | Next

## FLcolor

FLcolor — A FLTK opcode that sets the primary colors.

## Description

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

## Syntax

    FLcolor ired, igreen, iblue

## 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

## Performance

These opcodes modify the appearance of other widgets. There are two types of such opcodes, those that don't contain the ihandle argument which affect all subsequently declared widgets, and those without 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.

## 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

Prev | Up | Next
FLbutton | Home | FLcolor2