Generic FunctionPackage: common-graphicsToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Minimally revised from 6.1

palette

Arguments: stream

Returns the value of the palette property of stream. stream should be a cg-stream.

Valid values for a palette are either the symbol :rgb or a palette handle (an integer) that was returned by a call to open-palette. When the value is :rgb (the default), the foreground-color and background-color of the window should always be an rgb object, which will be mapped or dithered to one of the 20 system colors (which consist of the 16 standard VGA colors plus four other colors from the end user's Control Panel preferences). When the value is a palette handle, the foreground and background colors should always be an integer index into the color vector that was passed to open-palette.

(Note that some earlier releases accepted nil as a value equivalent to :rgb. nil is no longer a valid value.)

Rgb objects are created with make-rgb. There are some predefined rgb colors like red, blue, black, etc.

Palettes are useful only when the end user may be running Windows in 8-bit (256-color) mode or 16-bit (65,536-color) mode.

Palette handles are created with open-palette.

See cg-color-palettes.htm. Among other things, that file discusses when assigning a palette to a window is desirable or necessary.


Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page has had minimal revisions compared to the 6.1 page.
Created 2002.2.26.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Minimally revised from 6.1