
PNG-8 usually means an indexed-color PNG in which each pixel refers to a palette containing no more than 256 entries. PNG-24 usually means a truecolor PNG storing 8-bit red, green and blue samples for each pixel. PNG-8 is often suitable for flat, limited-color graphics; PNG-24 better preserves gradients and varied color. These terms are exporter shorthand rather than formal PNG format names, so they do not by themselves guarantee a particular kind of transparency.
PNG-8 vs PNG-24 at a glance
| Feature | PNG-8 shorthand | PNG-24 shorthand |
|---|---|---|
| Usual color mode | Indexed color | Truecolor RGB |
| Pixel data | An index pointing to a palette entry | Red, green and blue samples |
| Color capacity | Up to 256 palette entries | No palette limit; 8 bits per RGB channel provide about 16.7 million combinations |
| Transparency | Optional alpha values attached to palette entries | Plain RGB may use a transparent color; full per-pixel alpha requires truecolor with alpha, often called PNG-32 |
| Typical strengths | Icons, diagrams, pixel art and flat UI graphics | Gradients, textured artwork and color-rich screenshots |
| Always smaller? | No | No |
How indexed PNG stores color
An indexed PNG stores a color table and records which table entry each pixel uses. Its index bit depth can be 1, 2, 4 or 8 bits; an 8-bit index can address up to 256 entries. The PNG specification identifies this as indexed-color mode rather than a separate format formally named PNG-8.
If the source contains more colors than the palette can hold, the encoder must quantize it. Quantization selects a reduced set of representative colors and maps the original pixels to them. It may work almost invisibly on a simple icon, but a sky gradient, soft shadow or antialiased illustration can develop distinct bands or altered edges.
Dithering disguises missing shades by arranging nearby palette colors into a fine pattern. It can make a gradient look smoother at normal viewing size, but close inspection may reveal grain. That extra variation can also make the pixel stream less compressible.

What PNG-24 actually stores
A typical PNG-24 stores one 8-bit sample for each RGB channel, giving 24 color bits per pixel before compression. It does not need to reduce the image to a shared palette, so it preserves subtle transitions and numerous distinct colors more predictably.
PNG compression is lossless: decoding restores the stored samples exactly. That does not mean a converted PNG-8 remains identical to its original, because palette quantization happens before those new indexed samples are saved. Once created, however, the indexed PNG itself is decoded without further loss. For more on that distinction, see what lossless PNG compression changes and preserves.
Transparency and the PNG-32 label
The common claim that PNG-8 supports only fully transparent or fully opaque pixels is incomplete. An indexed PNG can include a tRNS table assigning an alpha value to each palette entry. This allows partial transparency, but pixels using the same palette entry must share its color and alpha value. Complex soft edges may therefore consume many palette entries or quantize poorly.
Ordinary truecolor RGB does not include a full alpha sample for every pixel. Truecolor with alpha is a separate PNG color type and is often labeled “PNG-32” because it commonly combines 24 color bits with 8 alpha bits. Export applications do not use these marketing labels consistently, however. A menu option called PNG-24 may produce RGB with alpha, while another may not.

A checkerboard is not proof that the file contains transparency. Editors and viewers commonly draw a checkerboard as interface chrome behind transparent areas, but the pattern can also be baked into opaque pixels. Place the image over two contrasting backgrounds or inspect its alpha data. The related explanation of how transparent PNG backgrounds work covers the distinction in more detail.
Why PNG-8 is not always smaller
PNG-8 starts with fewer bits per pixel in many cases, but final size depends on more than nominal color depth. An indexed file needs a palette and may need a transparency table. On a tiny image, that overhead can outweigh the reduced pixel data. An encoder may also use an 8-bit index despite the image needing far fewer colors.
Compression responds to patterns, not just color count. A clean truecolor image with long, predictable runs can compress efficiently, while aggressive dithering can introduce rapidly changing indices that compress poorly. PNG row filters, Deflate strategy, metadata and encoder implementation also affect the result. Consequently, a well-optimized truecolor PNG can occasionally beat a badly encoded or heavily dithered indexed version.
A practical export checklist
- Inspect the content: flat fills and repeated colors favor indexed PNG; gradients, textures and soft lighting favor truecolor.
- Check transparency: confirm whether you need no transparency, one transparent color, palette alpha or independent per-pixel alpha.
- Export plausible alternatives: do not infer the result from a PNG-8, PNG-24 or PNG-32 menu label alone.
- Compare at 100% zoom: inspect gradients, small text, antialiased curves, shadows and translucent edges.
- Test real backgrounds: preview transparent assets over light, dark and saturated colors.
- Compare actual bytes: retain the smallest candidate that meets the visual requirement, not simply the one with the lowest nominal bit count.
- Remove unnecessary metadata. do so only when the workflow does not require embedded profiles, text or other ancillary information.
As a working rule, begin with indexed PNG for deliberately limited-color art and with truecolor or truecolor-with-alpha for nuanced raster imagery. Then verify both appearance and file size. The encoded file—not the export label—provides the final answer.
A repeatable PNG-8 versus PNG-24 export check
- Start with one original image. Keep pixel dimensions identical in both exports so resolution does not distort the comparison.
- Export the palette-based version and the truecolour version. Record the actual file size rather than assuming the smaller colour depth always produces the smaller file.
- Inspect gradients, small lettering and soft edges at 100% zoom. Then view both at their intended display size.
- Place transparent results on white, dark and coloured backgrounds. Look for lost edge detail or unintended opaque pixels.
- Choose the smallest export that preserves the details your readers need, and retain the original for future edits.
A screenshot of the export dialogue is not proof of the resulting file's colour model. Export labels vary between tools. The PNG specification distinguishes indexed-colour, truecolour and alpha-bearing forms; the file's actual properties matter more than a preset name.
A four-pixel transparency example
Imagine a one-row image with four pixels: opaque red, half-transparent red, opaque blue and transparent blue. An indexed PNG needs four palette entries to represent these four color-and-alpha combinations, even though only two RGB colors appear. Its transparency table can assign alpha values 255, 128, 255 and 0 to those entries. A truecolor-with-alpha PNG stores each pixel’s RGB and alpha directly. This constructed example explains the storage difference; it is not a file-size benchmark.