Paint.NET Paint Bucket: Contiguous vs Non-Contiguous

In Paint.NET, the Paint Bucket tool fills areas of color based on the selected Flood Mode: Contiguous or Non-Contiguous (Global). While Contiguous mode restricts the fill to connected, neighboring pixels of a similar color, Non-Contiguous mode targets all matching pixels across the entire active layer or selection, regardless of whether they touch the clicked area. Understanding how these two modes operate allows for precise coloring and rapid global adjustments without needing manual pixel selections.

Contiguous Mode

When the Paint Bucket is set to Contiguous, it behaves like a traditional flood-fill tool.

  • How it works: You click on a target pixel, and the tool evaluates the adjacent pixels (up, down, left, right, and diagonally). If the neighboring pixels fall within the current Tolerance threshold, the fill spreads to them and continues outward until it hits a boundary of non-matching pixels.
  • Pixel connectivity: The fill is strictly bounded. If two identical shapes are on the same layer but separated by a line or empty space, clicking one shape will leave the other completely untouched.
  • Best used for:
    • Filling isolated line art or closed shapes.
    • Localized background replacements.
    • Adding color to a specific section of an image without altering identical colors elsewhere on the canvas.

Non-Contiguous (Global) Mode

When the Paint Bucket is set to Non-Contiguous (often referred to as Global mode), the physical connection between pixels is ignored.

  • How it works: Clicking a target pixel causes the tool to scan the entire active layer (or the bounds of an active selection). Any pixel matching the clicked color within the defined Tolerance is replaced with your chosen color, regardless of where it is located on the layer.
  • Pixel connectivity: Unconnected regions, scattered dots, or isolated sections across opposite sides of the canvas are filled simultaneously.
  • Best used for:
    • Swapping a specific color throughout an entire design (such as changing all red elements to blue).
    • Removing or recoloring fragmented backgrounds, like sky visible through tree branches.
    • Recoloring text or multi-part icons without clicking each letter or segment individually.

The Role of Tolerance in Both Modes

Both Contiguous and Non-Contiguous modes are governed by the Tolerance slider located in the top toolbar:

  • Low Tolerance (0%–20%): The tool only fills pixels that are nearly identical in color and shade to the clicked pixel.
  • High Tolerance (50%+): The tool fills a wider spectrum of shades, antialiased edges, and related hues.
  • 100% Tolerance: Fills the entire layer (or selection) with the primary color, regardless of the mode selected.