DR COLOR TO RGB

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


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

ParameterTypeDescription
colorIntegerColor
redLongintRed value
greenLongintGreen value
blueLongintBlue value

Description

The command DR COLOR TO RGB maps the color defined by color into its three components: red, green, and blue.

color is an internal number used by 4D Draw and can be obtained through the functions DR RGB to color, DR Index to color, DR GET FILL ATTRIBUTES, and DR GET LINE ATTRIBUTES.

On Mac OS, the obtained values are the same as the System Chromatic Wheel (Color Picker). On Windows, they are the same as the custom color selector values multiplied by 256.

Example

The following example gets the fill color of the selected objects and then breaks it down into its three components.

   DR GET FILL ATTRIBUTES (Area;0;$Pattern;$Color)
   DR COLOR TO RGB ($Color;$Red;$Green;$Blue)

See Also

DR RGB to color.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next