GR_COLOR

Name

GR_COLOR -- Color value

Synopsis

typedef unsigned long GR_COLOR;
  

Description

A GR_COLOR type is a device independent value used to define a color within nano-X.

Nano-X uses an unsigned 32 bit integer to represent colors. The lowest order three bytes define the color, while the highest order byte is always 0. This results in approximately 16 million colors that can be sopecified. The colorvalue is laid out as:

Table 3-1. 32bit Color Value

31 . . . 2423 . . . 1615 . . . 87 . . . 0
0BlueGreenRed
The macro GR_RGB() can be used to specify a color.

Color Definitions

If you define MWINCLUDECOLORS before inclusion of the nano-X header file.
#define MWINCLUDECOLORS
#include "nano-X.h"
  
Your application will have access to the following basic color definitions.

Table 3-2. Basic Color Definitions

BLACKBLUEGREENCYANRED
MAGENTABROWNLTGRAYLTBLUELTGREEN
LTCYANLTREDLTMAGENTAYELLOWWHITE
DKGRAY    

The following definitions are not actually colors of GR_COLOR but they can be used with the GrGetSysColor() to retrieve a GR_COLOR type value.

Table 3-3. System Color Definitions

Color IndexDescription
GR_COLOR_DESKTOPDesktop background color
GR_COLOR_ACTIVECAPTIONActive window caption color
GR_COLOR_ACTIVECAPTIONTEXTActive window caption text color
GR_COLOR_INACTIVECAPTIONInactive window caption color
GR_COLOR_INACTIVECAPTIONTEXTInactive window caption text color
GR_COLOR_WINDOWFRAME3-D Window frame color
GR_COLOR_BTNSHADOW3-D button shadow color
GR_COLOR_3DLIGHT3-D window light color
GR_COLOR_BTNHIGHLIGHT3-D button highlight color
GR_COLOR_APPWINDOWTop level window background color
GR_COLOR_APPTEXTTop level window text color
GR_COLOR_BTNFACEButton face color
GR_COLOR_BTNTEXTButton text color
GR_COLOR_WINDOWNormal backgrouns color in a window
GR_COLOR_WINDOWTEXTNormal text color in a window.
GR_COLOR_HIGHLIGHTHighlight background color
GR_COLOR_HIGHLIGHTTEXTHighlighted text color
GR_COLOR_GRAYTEXTGrayed out text color
GR_COLOR_MENUTEXTMenu text color
GR_COLOR_MENUMenu background color

See Also

GR_RGB(), GrGetSysColor(), GrSetBorderColor(), GrSetGCForeground(), GrSetGCBackground(), GrFindColor(), GrSetWindowBackgroundColor(), GrSetWindowBorderColor().