Banding after PNG compression almost always comes from a limited colour table. The encoder squeezes your image into 256 shades or fewer. Smooth gradients need far more than that. The result is visible stepping, and no setting fully escapes it. Compression tools sometimes add dithering, a speckled pattern of neighbouring tones, to disguise the steps. That trades banding for grain. Here is what causes the stepping, what dithering does, and how to set your encoder for cleaner gradient work.
What Causes Banding in Compressed PNGs
Lossy PNG compression cuts the number of distinct tones to fit a table of 256 or fewer entries. A smooth gradient that originally uses hundreds of subtle steps gets forced into a handful of bins. The jumps between those bins show up as horizontal or vertical bands. This is png gradient banding, and it is easiest to spot on large, smooth areas viewed at 100% zoom. Gradients look stepped when the colour table cannot represent the fine transitions between shades.
How Dithering Hides Banding (and Adds Noise)
To mask the visible steps, many compression tools apply dithering. Dithering mixes neighbouring table entries in a pattern, for example Floyd Steinberg error diffusion, to simulate missing shades. From a distance the gradient looks smoother. Up close you see grain. Dithered output also compresses slightly less well, because the added noise reduces the efficiency of the compression algorithm. Decide which you dislike more: visible banding or visible grain.
Lossless Optimisation the No Banding Guarantee
Lossless optimisation keeps every original tone in the file. It never reduces the colour table and never causes banding. If your image contains smooth gradients, soft backgrounds, or photographic content, lossless compression is the safest choice. The file will be larger than a lossy version. You will see zero banding and zero dither noise. For images where colour accuracy matters, lossless is the only option.
When to Use Lossy Compression Anyway
Lossy compression can shrink a PNG file by up to a significant amount with transparency intact and no watermark. That makes it useful for web graphics, icons, and simple illustrations with flat areas. For gradient heavy images such as photos or soft backgrounds, a different format serves you better. JPG or WebP handle continuous tones more efficiently and do not force a 256 colour table. If you must use PNG, test your compression tool with dithering turned off first. Then judge whether the banding is acceptable.
Adjusting Compression Settings to Reduce Banding
You control the outcome with two main settings: the number of colours and the dithering method.
Reduce the Colour Count Carefully
At 256 colours, gradients still show banding. For images with few tones, a lower table of a few colours may work fine. For gradients, you want the highest count the tool allows. Even 256 colours will produce steps on a long gradient.
Turn Dithering Off First
Disable dithering and examine the result. If banding is too obvious, enable dithering at a low strength. This adds less grain while still breaking up hard edges. Test at 100% zoom on the smoothest area of your image.
- Open your PNG in an image editor or compression tool.
- Locate the palette or colour reduction settings.
- Set the count to the maximum allowed, often 256.
- Turn dithering off and save a test copy.
- Zoom to 100% and inspect smooth areas for banding.
- If banding is visible, enable dithering at a low percentage.
- Compare file sizes and visual quality. Choose the setting that gives the best trade off.
Testing Your Output for Banding and Noise
Banding is easiest to spot on large, smooth areas viewed at 100% zoom. Open your compressed PNG in any viewer and zoom to actual pixels. Look at sky, skin tones, or soft gradients. Distinct colour steps mean banding. A fine pattern of dots or speckles means dither noise. Both are side effects of table based compression. If neither is acceptable, use lossless optimisation or switch to a format that handles gradients better.
Choosing the Right Format for Gradient Heavy Images
PNG is excellent for graphics with sharp edges, text, and transparency. For photographs, digital art, or any image with smooth colour transitions, consider JPG or WebP. These formats preserve continuous tones without forcing a small colour table. If you must deliver a PNG, for example to maintain transparency, use lossless compression. The file will be larger but you will avoid banding and dither noise entirely. Test your images on a service like compresspng.net to see the difference between lossy and lossless output.