Skip to main content

Module palette

Module palette 

Source
Expand description

The fixed 16-color Pixel8 palette.

Pixel8 uses the same well-known 16 colors as PICO-8 so that carts have the classic fantasy-console look. Every drawing operation takes a color index in 0..16; the palette itself is not modifiable by carts.

Modules§

col
Color index constants, for readable host-side UI code.

Constants§

PALETTE
The palette as [r, g, b] triples, indexed by color number.
PALETTE_SIZE
Number of colors in the palette.

Functions§

rgba
Convert a color index to RGBA bytes (alpha always 255).