Color constants are used to specify one of the defined Newlook colors. They can be used in place of actual color values.
Constant (Macros) |
Constant (Scripts) |
Hexedecimal value |
Description |
|
|
&H00000000 |
Black |
|
|
&H00800000 |
Dark blue |
|
|
&H00008000 |
Dark green |
|
|
&H00808000 |
Dark cyan |
|
|
&H00000080 |
Dark red |
|
|
&H00800080 |
Dark magenta |
|
|
&H00008080 |
Dark yellow |
|
|
&H00C0C0C0 |
Light gray |
|
|
&H00808080 |
Dark gray |
|
|
&H00FF0000 |
Light blue |
|
|
&H0000FF00 |
Light green |
|
|
&H00FFFF00 |
Light cyan |
|
|
&H000000FF |
Light red |
|
|
&H00FF00FF |
Light magenta (pink) |
|
|
&H0000FFFF |
Light yellow |
|
|
&H00FFFFFF |
White |
It is possible to specify color values in either the hexadecimal-based &H00BBGGRR format or as a decimal value when setting color-based properties dynamically in a script or macro.
It is important to note though, that macros return colors in the hexadecimal format whereas scripts return colors as a decimal value.
Occasionally you may need to convert from the decimal format to the hexadecimal-based format in order to compare values within a script. To do this you can use the following code in your script:
VB SCRIPTvHexColor = "&H00" & Hex(App.ActiveForm.BackColor) JAVASCRIPTvHexColor = "&H00" + App.ActiveForm.BackColor.toString(16); |
RGB Function | QBColor Function | ForeColor property | BackColor property
© 2004-2021 looksoftware. All rights reserved.