Skip to Content

Turn any image into hardware-accurate retro pixel art

bitmapped doesn’t just swap palettes — it reproduces the actual color limitations of real hardware. Palette quantization, spatial constraints, and display characteristics, all in a zero-dependency TypeScript library.

import { process } from 'bitmapped'; const result = process(imageData, { blockSize: 4, palette: preset.palette, dithering: 'floyd-steinberg', }); ctx.putImageData(result.imageData, 0, 0);

Try it live

Pick a system preset and see the output update in real time:

Original
Game Boy (DMG)

Why bitmapped?

Not just palette swapping

Real retro hardware doesn’t let you use any color anywhere. The NES forces colors into 16×16 blocks. The ZX Spectrum locks brightness per 8×8 cell. bitmapped enforces these spatial constraints — that’s what makes the output look authentic.

54 real hardware presets

From the 4-shade Game Boy to the 32,768-color SNES, from Atari 2600 scanline limits to Amiga HAM mode. Each preset includes the correct palette, resolution, constraint type, and display characteristics.

Zero dependencies

Pure TypeScript, no native modules, no WASM. Works in browsers, Node.js, Deno, and web workers. Every algorithm — color distance, dithering, constraint solving — implemented from scratch.

Quick example

import { process } from 'bitmapped'; import { getPreset, enumerateColorSpace } from 'bitmapped/presets'; // Load a preset const nes = getPreset('nes-ntsc'); // Process your image const result = process(imageData, { blockSize: 4, palette: nes.palette, dithering: 'floyd-steinberg', distanceAlgorithm: 'redmean', constraintType: nes.constraintType, attributeBlockConfig: { width: 16, height: 16, maxColors: 4, }, }); // Render the result ctx.putImageData(result.imageData, 0, 0);

System presets

Get started

Install bitmapped and convert your first image in under 5 minutes.

npm install bitmapped

Read the getting started guide →

Last updated on