Newlook Color Constants

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

ClrBlack

nlClrBlack

&H00000000

Black

ClrDarkBlue

nlClrDarkBlue

&H00800000

Dark blue

ClrDarkGreen

nlClrDarkGreen

&H00008000

Dark green

ClrDarkCyan

nlClrDarkCyan

&H00808000

Dark cyan

ClrDarkRed

nlClrDarkRed

&H00000080

Dark red

ClrDarkMagenta

nlClrDarkMagenta

&H00800080

Dark magenta

ClrDarkYellow

nlClrDarkYellow

&H00008080

Dark yellow

ClrGray

nlClrGray

&H00C0C0C0

Light gray

ClrDarkGray

nlClrDarkGray

&H00808080

Dark gray

ClrBlue

nlClrBlue

&H00FF0000

Light blue

ClrGreen

nlClrGreen

&H0000FF00

Light green

ClrCyan

nlClrCyan

&H00FFFF00

Light cyan

ClrRed

nlClrRed

&H000000FF

Light red

ClrMagenta

nlClrMagenta

&H00FF00FF

Light magenta (pink)

ClrYellow

nlClrYellow

&H0000FFFF

Light yellow

ClrWhite

nlClrWhite

&H00FFFFFF

White

Converting color values in scripts and macros

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 SCRIPT

vHexColor = "&H00" & Hex(App.ActiveForm.BackColor)

JAVASCRIPT

vHexColor =  "&H00" + App.ActiveForm.BackColor.toString(16);

See Also

RGB Function | QBColor Function | ForeColor property | BackColor property


© 2004-2021 looksoftware. All rights reserved.