Command WR COLOR TO RGB

4D Write

WR COLOR TO RGB

version 6.0


WR COLOR TO RGB (color; red; green; blue)

ParameterTypeDescription
colorLongintColor
redLongintReceives red value (0 to 65535)
greenLongintReceives green value (0 to 65535)
blueLongintReceives 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

WR RGB to color.