Command WR RGB to color

4D Write

WR RGB to color

version 6.0


WR RGB to color (red; green; blue) Longint

ParameterTypeDescription
redLongintRed component (0 to 65535)
greenLongintGreen component (0 to 65535)
blueLongintBlue component (0 to 65535)

Function result Longint Color

Description

The WR RGB to color command returns a compact number that is used by 4D Write to manage colors. This number represents the three component colors: red, green, and blue. The red, green, and blue parameters are the same values used in your system's color picker. These values range from 0 to 65535.

The following table shows the values for red, green, and blue in commonly used colors:

Example

The following example returns a color between two colors:

   WR COLOR TO RGB (c1;r1;g1;b1)
   WR COLOR TO RGB (c2;r2;g2;b2)
   c3:=WR RGB To color ((r1+r2)/2;(g1+g2)/2;(b1+b2)/2)

See Also

WR COLOR TO RGB.