CGA mode simulator
The real CGA 320×200 4-color graphics mode — interactive. Pick a palette, intensity, mode 5, and any background, and watch the actual four colors (and a live preview) update. This is not a free four-color picker, because the hardware never was.
How CGA 320×200 color actually works
The IBM Color Graphics Adapter's most-used graphics mode is 320×200 with four colors on screen. Almost every "CGA palette" reference presents that as a free choice of any four colors. It isn't, and that mistake is exactly what this tool exists to correct.
Each pixel in 320×200 mode is two bits, so it indexes one of four entries. Entry 0 is the background, and that one you really can set to any of the 16 RGBI colors. Entries 1, 2, and 3 are not individually programmable. Instead the hardware offers a small number of preset three-color groups, and you select between them with two bits in the mode-control register: a palette-select bit and an intensity bit.
- Palette 0, low: green, red, brown.
- Palette 0, high: light green, light red, yellow.
- Palette 1, low: cyan, magenta, light gray.
- Palette 1, high: light cyan, light magenta, white.
There is also mode 5, an officially undocumented configuration that swaps in a third group — cyan, red, and light gray (low) or light cyan, light red, and white (high). That cyan/red/white look is the one a lot of DOS games reached for because it read as more natural than the lurid magenta of palette 1. Because it was never in the spec, plenty of references omit it entirely; it is included here.
Two things follow from this design. First, the famous "CGA cyan-magenta-white" aesthetic isn't a stylistic choice developers made so much as a constraint the hardware imposed. Second, swapping the background color genuinely changes the whole image's feel without touching the three foreground colors — which is why the background picker above is a real creative lever, not a gimmick. The brown in palette 0 low is the same hardware-corrected #AA5500 from the CGA palette reference, not dark yellow.
Frequently asked
- Why can't I set all four colors independently?
- The CGA hardware only stores one freely-programmable color for 320×200 mode (the background). The other three are selected as a fixed group by the palette and intensity bits. That's a hardware limitation, not a tooling one.
- Is mode 5 "real"?
- Yes — it's a genuine hardware mode, just one IBM never documented. It exposes the cyan/red/light-gray palette. Games like Prince of Persia's CGA mode and many others used it.
- What about composite (artifact) colors?
- On an NTSC composite monitor these dot patterns blend into a different, larger set of colors — see CGA composite colors and the side-by-side composite simulator. We decode the real signal rather than sampling RGBI directly, the error nearly every other tool makes.