PureBasic - Palette
Overview
Palettes can be used only on screens with 256 colors (or less) and allow to 'map' the colors displayed. It's possible to assign each color (indexed from 0 to 255) to a specified RGB color, choosen from a 24 bit palette (16 Millions colors). The advantage is huge, as all the pixels from a color can be changed to another color only by changing its associated color. It allows to do very fast palette cycling, fade-in, fade-out and other well know effects.
A color table with common colors and their accompanying RGB values you will find here.
Command Index
CreatePalette
DisplayPalette
FreePalette
GetPaletteColor
InitPalette
IsPalette
LoadPalette
SetPaletteColor
Example
Palette.pb
Supported OS
Windows, AmigaOS, Linux