Colors can be expressed as:
See the Color table for available colors and their RGB Notation.
To set the Color property of a component in MaxBasic, you can either use ColorByName, or ColorRGB. For example, to change the font colour of a component to red, you could use one of these code examples:
shape1.PenColor=#FF0000
shape1.PenColor=ColorByName("Red")
shape1.PenColor=ColorRGB(255, 0, 0)
If you enter a color in BGR notation (i.e. without a leading hash), such as FF0000, this will be converted to RGB with a hash, such as #0000FF.
Note: The hex notation cannot be used to set the color property. Use one of the examples above to set the color using MaxBasic.
Colors in the property editor are displayed as the Color Name if the color matches a color in the color table, otherwise the hex notation is displayed.
Note: If printing to Excel or to disk file in Excel format color will map to the nearest color in the 56 colors available in the default Excel Color palette.