version 6.0
DR RGB to color (red; green; blue) Longint
Parameter | Type | Description | |
red | Longint | Red component | |
MacOS: 0 to 65535 | |||
Windows: (0 to 255)*256 | |||
green | Longint | Green component | |
MacOS: 0 to 65535 | |||
Windows: (0 to 255)*256 | |||
blue | Longint | Blue component | |
MacOS: 0 to 65535 | |||
Windows: (0 to 255)*256 | |||
Function result | Longint | Color 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.
Macintosh | Windows | |||||
Color | Red | Green | Blue | Red | Green | Blue |
Red | 56576 | 2048 | 1536 | 221 | 8 | 6 |
Green | 0 | 32768 | 4352 | 0 | 128 | 17 |
Blue | 0 | 0 | 54272 | 0 | 0 | 212 |
Cyan | 512 | 43776 | 59904 | 2 | 171 | 234 |
Magenta | 64512 | 62208 | 1280 | 252 | 243 | 5 |
Yellow | 61952 | 2048 | 33792 | 242 | 8 | 132 |
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