How Color Tolerance Works in Paint.NET Paint Bucket
In Paint.NET, the Paint Bucket tool uses a color tolerance setting to determine how aggressively it replaces adjacent pixels with your chosen fill color. By adjusting the tolerance percentage slider in the toolbar, you control the acceptable difference between the base color of the clicked pixel and the colors of the surrounding pixels. Understanding how this threshold works allows you to cleanly fill regions, handle anti-aliased edges, and eliminate unwanted color fringing without affecting unrelated parts of your image.
The Mechanics of Color Tolerance
When you click a pixel with the Paint Bucket tool, Paint.NET records that pixel’s exact Red, Green, Blue, and Alpha (RGBA) values as the target. The software then checks neighboring pixels to see if their color values fall within an acceptable mathematical distance from that base target.
Tolerance is measured on a scale from 0% to 100%:
- 0% Tolerance: The tool requires an absolute match. Only pixels sharing the exact same RGBA value as the clicked pixel are filled. This is ideal for clean, uncompressed pixel art, but it leaves jagged, unfilled edges around anti-aliased lines.
- Low Tolerance (1%–30%): The tool allows minor variations in shade. This range is optimal for filling areas with slight compression noise or faint gradients while preventing the color from bleeding past hard borders.
- Default Tolerance (Around 50%): Paint.NET defaults to 50%, which accommodates standard anti-aliasing and soft edges created by brushes or pencils. It fills the main body of a shape and blends into the semi-transparent edge pixels.
- High Tolerance (70%–99%): The tool accepts drastically different colors. This is useful when attempting to fill textured surfaces, sketches, or heavily artifacted JPEG images, though it increases the risk of bleeding into adjacent shapes.
- 100% Tolerance: Color differences are completely ignored. The bucket fills every pixel within the active selection or boundary, treating all colors identically.
Interaction with Flood Modes
The effect of the tolerance setting is directly shaped by the tool's Flood Mode:
- Contiguous Mode: The tool evaluates tolerance starting from the clicked pixel and spreads outward only to connected pixels that meet the criteria. If an edge exceeds the tolerance threshold, the fill stops, containing the color within that boundary.
- Global Mode: The tool evaluates every pixel on the active layer or selection simultaneously, regardless of whether they touch. Any pixel across the canvas that falls within the tolerance range of the sampled color is replaced.
Real-Time Adjustment
A key feature of Paint.NET is the ability to adjust tolerance after applying a fill. After clicking with the Paint Bucket, dragging the tolerance slider left or right instantly updates the active fill on the canvas. This allows you to visually fine-tune the exact threshold required to capture anti-aliased borders without spilling over into surrounding artwork.