COLOR
PLBCMP GUI Only
The COLOR instruction defines an object variable for a twenty-four bit color object. This object may be used in creating other user objects. To define a COLOR, use one of the following statement formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Data Label.
%
Optional. Denotes the item as being GLOBAL.
arraysize
Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.
^
Optional. Denotes the item as being a POINTER.
target
Required. The name of a previously defined data item of the same type.
Flags Affected: NONE
Note the following:
The COLOR object contains three component values: the red, green, and blue values.
Each value has the range of zero to 255. The compiler does not check for the proper range. The actual value used is modulo (value, 256).
The actual values are established via the CREATE statement. If they are not given on the CREATE statement, the runtime activates a Color Dialog that allows the user to select a color.
The COLOR object may be used in the creation of other types of objects where permitted.
Multi-dimension arrays are supported up to a maximum of fourteen dimensions.
The ^ denotes a Pointer Variable.
Unlike most objects, a COLOR object may be defined as Global and will not be DESTROYed during a CHAIN instruction.
See Also: Example Code, Object Definitions, Object Output Instructions
![]() |