Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

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.

GTK Note

Palettes have not yet been implemented on the GTK platform. Calling the palette-related functions on GTK will have no effect.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version