Spectrum Attribute Clash Calculator
Computes how many 8x8 attribute clash regions exist on a 256x192 pixel ZX Spectrum screen used by the famous color hardware issue.
—
ZX Spectrum attribute clash
The Sinclair ZX Spectrum (1982) draws a 256×192 pixel bitmap, but its color lives in a much coarser place: a 32×24 grid of 8×8 attribute blocks. Every one of those blocks gets just 2 colors (INK + PAPER), along with a BRIGHT and a FLASH bit, picked from a fixed 15-color palette (8 normal plus 7 bright, with black shared between them). Put two different objects in the same 8×8 cell and one of them gets recolored whether you like it or not. That's the infamous "attribute clash". Attribute RAM comes to 32×24 = 768 bytes, mapped at $5800, and the bitmap takes 6144 bytes at $4000. The better developers (Ultimate Play the Game, Tim Follin's brother Mike) drew sprites that lined up with the attribute grid so the clash never showed.
Applications
Retrogaming work for the ZX Spectrum on modern toolchains (z88dk, sjasmplus), demoscene productions aimed at the Spectrum 48K/128K, emulator authors (Fuse, ZEsarUX, Spectaculator), converting pixel art from PNG into SCREEN$ format, and homebrew releases on places like itch.io and the World of Spectrum archive.
FAQ
Why only 2 colors per block? Memory was tight in 1982. Color stored per pixel would have eaten 8× more RAM (≈48 KB just for the screen), whereas the 32×24 attribute grid keeps the whole framebuffer under 7 KB.
How do games avoid the clash? A few standard tricks. Monochrome sprites over a black background, sprite hitboxes that snap to the 8×8 cells, the BRIGHT bit pressed into service as a fake third color, or just leaning into the clash and treating it as the look (see Knight Lore).
What's SCREEN$? It's the 6912-byte snapshot of video RAM (6144 bitmap + 768 attributes), usually dumped to .SCR files when people want to share pixel art.
Related Tools
Apple II Hi Res Resolution Calculator
Computes pixels and bytes occupied by Apple II hi res 280x192 screen with 6 active bits per byte and color bytes per line.
Amiga OCS Palette Calculator
Computes simultaneous colors and required bitplanes for Amiga Original Chip Set video modes per chosen horizontal width.
Beer SRM Calculator
Calculates beer SRM from malt color and amount.
RGB Color Temperature
Estimate the correlated color temperature (Kelvin) of an RGB color via McCamy approximation.
Star Color Temperature Calculator
Estimates effective star temperature in Kelvin from the B-V color index using Ballesteros approximation.
C41 Color Development Time by Temperature
Estimates C41 color film development time by bath temperature.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.