All examples · Sprites and 2D · As Markdown, for AIs

Console palettes

What this example shows

The colours of three machines come with the engine, in BUILTIN.PALETTES. snapToPalette moves every pixel of a picture to the nearest of them, and checkColorLimit says which cells use more colours than a machine could: here, each 8 by 8 with more than four is marked in red.

Click the preview first so it hears the keyboard. Space sends the whole screen through paletteMatch with the Game Boy's colours, from useLoadPalette({ src: 'nacatamalon:gameBoy' }), with no file.

Starting
Starting
—