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

version 6.0


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

ParameterTypeDescription
redLongintRed component
MacOS: 0 to 65535
Windows: (0 to 255)*256
greenLongintGreen component
MacOS: 0 to 65535
Windows: (0 to 255)*256
blueLongintBlue component
MacOS: 0 to 65535
Windows: (0 to 255)*256
Function resultLongintColor number in compact form

Description

The command DR RGB to color returns a number in compact form, which is used by 4D Draw 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.

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

MacintoshWindows
ColorRedGreenBlueRedGreenBlue
Red565762048153622186
Green0327684352012817
Blue005427200212
Cyan51243776599042171234
Magenta645126220812802522435
Yellow619522048337922428132

Example

The following example sets the selected objects in Area to Red.

   $red := DR RGB to color (56683;2242;1698)
   DR SET FILL ATTRIBUTES (Area;0;3;$color)

See Also

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