The OBJECT GET RGB COLORS command returns the foreground and background colors of the object or group of objects designated by object.
If you pass the optional * parameter, you indicate that the object parameter is an object name (string). If you do not pass this parameter, you indicate that the object parameter is a field or a variable. In this case, you pass a field or variable reference (object field or variable only) instead of a string.
When the command is applied to a List box type object, the alternating background color for the rows can be returned in the altBackgrndColor parameter. In this case, the value of backgroundColor is used for the background of odd-numbered rows only.
The RGB color values returned in the foregroundColor, backgroundColor and altBackgrndColor parameters can be 4-byte longints of the format (0x00RRGGBB) or negative values corresponding to the "system" colors. In the latter case, you can compare the value obtained with the constants of the SET RGB COLORS theme:
Constant |
Type |
Value |
Comment |
Background color |
Longint |
-2 |
|
Background color none |
Longint |
-16 |
This constant can only be used with the backgroundColor and altBackgrndColor parameters. |
Dark shadow color |
Longint |
-3 |
|
Disable highlight item color |
Longint |
-11 |
|
Foreground color |
Longint |
-1 |
|
Highlight menu background color |
Longint |
-9 |
|
Highlight menu text color |
Longint |
-10 |
|
Highlight text background color |
Longint |
-7 |
|
Highlight text color |
Longint |
-8 |
|
Light shadow color |
Longint |
-4 |
|
Note: The "system" colors are applied using the OBJECT SET RGB COLORS command.
For more information about the format of the foregroundColor, backgroundColor and altBackgrndColor parameters, refer to the description of the OBJECT SET RGB COLORS command.