WR COLOR TO RGB
version 6.0
WR COLOR TO RGB (color; red; green; blue)
Parameter | Type | Description | |
color | Longint | Color | |
red | Longint | Receives red value (0 to 65535) | |
green | Longint | Receives green value (0 to 65535) | |
blue | Longint | Receives blue value (0 to 65535) |
Description
The WR COLOR TO RGB command maps the color defined by color into its three components: red, green, and blue. These values range from 0 to 65535.
color is an internal number used by 4D Write and can be obtained with the WR RGB to color function.
Example
The following example calculates the closest grey for a given color:
WR COLOR TO RGB (Color;Red;Green;Blue)
Blue:=(Blue+Green+Red)/3
Grey:=WR RGB To color (Blue;Blue;Blue)
See Also