Bit depth defines the precision of each color channel in a digital image. An 8-bit-per-channel image uses values 0–255 for each of red, green, and blue, yielding 256³ = 16,777,216 possible colors. Reduce that to 1 bit per pixel and you get exactly two colors — pure black and pure white — the foundation of classic monochrome art.
Common Bit Depths
- 1-bit — 2 colors. Pure black-and-white, no grays. Used in line art, fax, and early pixel art.
- 4-bit — 16 colors. Classic EGA palette, early Mac OS.
- 8-bit (indexed) — 256 colors from a palette lookup table. The defining format of GIF and classic pixel art. Each pixel stores an index into a color table rather than the color itself.
- 24-bit (8-bit per channel) — 16.7 million colors. The standard "true color" format of JPEG, PNG, and most web imagery. Sufficient for photographic content.
- 48-bit (16-bit per channel) — Trillions of colors. Used in professional photography and HDR workflows. Provides enough headroom for aggressive edits without banding.
The 256-Color Boundary
Our image analysis pipeline uses 256 as the threshold between indexed and RGB analysis modes. This is not arbitrary — it exactly corresponds to the maximum palette size of an 8-bit indexed image. An artwork with 256 or fewer unique colors is almost certainly working within an indexed-color paradigm (pixel art, GIF, limited-palette work), and every single color is intentional and should be preserved.
Above 256 unique colors, the image is effectively true-color, and exact color enumeration becomes meaningless — a solid gradient may contain thousands of mathematically unique but visually similar values. At this point, the system switches to grouped palette extraction using Euclidean RGB distance.
