Skip to content

Normalize PICO-8 palette aliases and fix bitplane mask#47

Open
stilvoid wants to merge 2 commits into
samhocevar:masterfrom
stilvoid:pico8-palette-aliases
Open

Normalize PICO-8 palette aliases and fix bitplane mask#47
stilvoid wants to merge 2 commits into
samhocevar:masterfrom
stilvoid:pico8-palette-aliases

Conversation

@stilvoid

@stilvoid stilvoid commented Apr 23, 2026

Copy link
Copy Markdown

PICO-8 masks screen palette entries before resolving the final display color, which means values such as 16..31 map back to the base palette and 240..255 map to the hidden palette.

Apply the same normalization to screen and raster palette entries at render time so the canonical hidden range and its byte aliases resolve consistently.

Additionally, fix bug assuming that bitplane mask is 3 bits instead of 4.

PICO-8 masks screen palette entries before resolving the final display color, which means values such as 16..31 map back to the base palette and 240..255 map to the hidden palette.

Apply the same normalization to screen and raster palette entries at render time so the canonical hidden range and its byte aliases resolve consistently.
@stilvoid stilvoid force-pushed the pico8-palette-aliases branch from aab90b9 to ffe969e Compare April 23, 2026 12:51
@stilvoid stilvoid changed the title Normalize PICO-8 palette aliases Normalize PICO-8 palette aliases and fix bitplane mask Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant