hardware-accurate retro display colors

EGA color palette

The Enhanced Graphics Adapter shows 16 colors at once, chosen from a master palette of 64. Below are the 16 CGA-compatible defaults and the full 64-color set, all with exact hex codes. Click any swatch to copy.

The 16 default colors

These defaults mirror CGA's RGBI palette for backward compatibility — including the same out-of-sequence brown at index 6. Most EGA software used exactly these and never touched the wider palette.

The full 64-color master palette

Every EGA color is 6-bit RGB — two bits per channel, so each channel takes one of four levels: 0, 85, 170, 255. That yields exactly 64 colors. The 16 defaults are outlined in amber within the grid below.

The road not taken. EGA could remap any of its 16 slots to any of these 64 colors, but almost no software did — it just used the CGA-compatible defaults. Try it in the interactive 16-of-64 palette remapper.

Frequently asked

How are the 64 colors generated?
Each color packs two bits per channel (a low bit and a high bit for red, green, and blue). The two bits give four intensity levels per channel: 0, 85, 170, and 255 in 8-bit terms. Six bits total → 64 combinations.
Are the 16 EGA defaults the same as CGA?
Yes — they were deliberately set to match CGA's 16 RGBI colors, brown and all, so CGA software ran unchanged.