- Name
-
SetStandardPalette -- copy colors from standard palette (V9.0)
- Synopsis
-
SetStandardPalette(id, type)
- Function
-
This function can be used to copy the colors from the standard palette specified by
type
to the palette specified by id
. Note that this might change the depth of the palette
specified by id
because the standard palette's depth is copied to the palette specified
by id
as well.
The following standard palettes are currently available:
#PALETTE_MONOCHROME:
-
Two color, black and white palette.
#PALETTE_GRAY4:
-
4 color grayscale palette.
#PALETTE_GRAY8:
-
8 color grayscale palette.
#PALETTE_GRAY16:
-
16 color grayscale palette.
#PALETTE_GRAY32:
-
32 color grayscale palette.
#PALETTE_GRAY64:
-
64 color grayscale palette.
#PALETTE_GRAY128:
-
128 color grayscale palette.
#PALETTE_GRAY256:
-
256 color grayscale palette.
#PALETTE_CGA:
-
Standard CGA palette (16 colors).
#PALETTE_OCS:
-
Standard OCS palette (32 colors).
#PALETTE_EGA:
-
Standard EGA palette (64 colors).
#PALETTE_AGA:
-
Standard AGA palette (256 colors).
#PALETTE_WORKBENCH:
-
Standard classic Amiga Workbench palette (256 colors).
#PALETTE_MACINTOSH:
-
Standard classic Macintosh palette (256 colors).
#PALETTE_WINDOWS:
-
Standard classic Windows palette (256 colors).
#PALETTE_DEFAULT:
-
Same as
#PALETTE_AGA
.
- Inputs
-
- id
- identifier of palette to use
- type
- desired standard palette to copy to target palette
- Example
-
SetStandardPalette(1, #PALETTE_EGA)
The code above copies the standard EGA palette to palette 1. The new depth of
palette 1 will be 6 (= 64 colors) after the operation.