Home   Comet Tips

Comet Tip


 

 

 

Comet Screen Colors

 

This tip presents information about Comet screen colors and the CWCOLOR dialog in Comet98 and Comet2000.

 

Comet was designed to use a set of 16 screen colors that correspond to the original 16 colors of the IBM CGA display adapter. In order to maintain compatibility with existing applications, Comet98 and Comet2000 were designed to use the same color scheme with some variation.

 

Depending on your system settings, Windows can display many colors of varying depths. The minimum color depth is 16 (4 bits) and the maximum is in the millions. Most systems come with a default color depth set to 256 (8 bits). This provides an adequate palette of colors for most typical business applications.

 

Windows provides a set of “system colors” which are mapped by the user to a system palette corresponding to the aforementioned adapter settings. These colors include (but are not limited to) captions, menus, dialogs, and text (foreground and background).

 

The CWCOLOR dialog allows the user to specify how Comet should use the available colors to display QCRT text. The dialog consists of three sections:

 

 

To activate the CWCOLOR dialog, run CWCOLOR from the READY prompt. The Comet Color Palette will be displayed.

 

The following sections explain the Palettes, Options, and Colors settings in this dialog.

 

Palettes

 

Standard Colors

 

This palette is the default chosen when Comet is first installed. It provides a color set that is consistent with the general appearance of Windows applications: soft, low contrast, pastel-like colors.

 

The individual colors for this palette cannot be modified, however, the entire palette can be copied from the custom palette below by clicking the “<< Custom” button.

Window Colors

 

This palette consists of three colors: foreground, background, and text. The colors used here come from the “system colors” mentioned above.

 

The Windows text color is used to represent all QCRT characters.

 

The Windows background color is used to represent the field portion of QCRT foreground text.

 

An algorithm is used to derive the field color for QCRT background text. If the user changes the system colors (Display Properties), the changes will be reflected in the Comet display.

 

DOS Colors

 

This palette consists of the 16 original DOS (CGA) colors.

 

Custom Colors

 

This palette allows the user to map any color from the system palette to any position in the Comet palette.

 

This palette can be copied from the “standard colors” palette by clicking the “<< Standard” button. This setting is most useful as a tool to design a replacement “Standard Colors.”

 

 

 

 

Options

 

Ignore CFIG Color Set

 

This option ignores the five configured colors and reduces the Comet palette to two basic color combinations: foreground field and background field combined with a text color.

 

Specific color changes, made using the (Change Color) or (Change Colors) mnemonics in Internet Basic, will continue to work, selecting the appropriate color(s) from the Standard Palette.

 

This option applies to the Standard Palette only.

 

The three colors can be chosen from any of the colors available from the system palette. By clicking on a color button, you can choose from the system palette the color that will represent the associated QCRT color.

 

 

The "Define Custom Colors>>" button allows you to choose from any color available from the system palette. Note: On systems with 256 or fewer colors or a lower resolution monitor, many custom colors are created by dithering, a method of combining colors to achieve a different color. Depending on the chosen color, this technique may cause some text to be unreadable.

 

 

Ignore Color Set Change

 

This option causes Comet to completely ignore the Internet Basic (Change Colors) mnemonic. The singular (Change Color) mnemonic will continue to work.

 

Display Entry Rectangle

 

This option provides a “focus” indicator at the cursor location by drawing a thin broken line around the entry field.

 

 

 

Behind the Scenes

 

The settings obtained from the CWCOLOR dialog are stored in the COSW.INI file located in the Windows folder. The layout is as follows:

 

[Colors]

;=================================================================

; Palette layout:

;

; Pal_0=DOS Colors (map to DOS colors)

; Pal_1=Standard Colors (provided by Signature)

; Pal_2=Custom Colors (can be modified in program)

;

; F=Foreground group of 16 colors

; B=Background group of 16 colors

;

; _LO=Lower 8 entries of a 16 color group

; _HI=Upper 8 entries of a 16 color group

;

; Example: Palette_0F_LO

;            DOS Palette

;            Foreground group

;            Lower 8 entries

;

; CUSTOM_SET=16 additional custom colors that can be used

;              with the 48 standard colors to define a palette.

;=================================================================

Active=2

Pal_2F_LO=<8 entries>

Pal_2F_HI=<8 entries>

Pal_1F_LO=<8 entries>

Pal_1F_HI=<8 entries>

Pal_1X_LO=<8 entries>

Pal_1X_HI=<8 entries>

Pal_0F_LO=<8 entries>

Pal_0F_HI=<8 entries>

CUSTOM_SET_LO=<8 entries>

CUSTOM_SET_HI=<8 entries>

Standard=0xf0fbff, 0xc0c0c0, 0x0

IgnoreCFIGColors=0

IgnorePROGColors=0

BkgndDiff=30

UseEntryRect=1

 

 

Updated on September 10, 2001.