User Tools

Site Tools


palette_set_number_of_hardware_colors_.htm
Navigation:  Language Reference > 9 -  Window and Report Attributes > Window and Report Attributes >====== PALETTE (set number of hardware colors) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

PALETTE(colors)

blk2blue.jpg

PALETTE Specifies the number of hardware colors displayed in the window.
colors An integer constant specifying the number of hardware colors displayed in the window.

The PALETTE attribute (PROP:PALETTE) on an APPLICATION or WINDOW structure specifies how many colors in the hardware palette you want this window to use when it is the foreground window. This is only applicable in hardware modes where a palette is in use and spare colors (not reserved by the system) are available - in practice this means 256 color mode. This enforces a particular set of colors for the graphics. 24-bit color (16.7M) does not use a hardware palette. Values of PALETTE above 256 are not recommended.

The value returned by PROP:PALETTE is the number of colors actually assigned (not necessarily the number asked for). Since the system normally reserves 20 in 256-color mode, setting PROP:PALETTE = 256 then immediately retrieving its value will usually result in a returned value of 236.

Example:

WinOne WINDOW,AT(0,0,160,400),PALETTE(26)      !Display 26-color

       IMAGE,AT(120,120,20,20),USE(ImageField)

      END

See Also:

IMAGE

palette_set_number_of_hardware_colors_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1