Back Home Table of Contents

Bucket Fill

The Bucket Fill tool is used for filling regions with a specified color.

Fill Modes

The Bucket Fill tool is able to fill different regions based on preference.

Contiguous

This is the classic "flood fill" mode that fills pixels of the same color in a contiguous (touching) region bounded by pixels of different colors.

Bounded

In this mode, all pixels within a region surrounded by the foreground color will be filled. This is useful for filling specific shapes with a color; just draw around the region with the Pencil tool first, and then click anywhere within it to fill it with the color.

Note that in order for this mode to function properly, there must be a properly enclosed region. If there are any gaps in the border color, the entire image will be filled instead.

All

In this mode, all pixels of a given color will be replaced, regardless of their position in the image. This is useful for quickly replacing a color.

NPS 2.x user tip: This is similar to the "Swap Colors" filter.

Fill Directions

Flood fill algorithms can check either 4 directions (up, down, left, right) or 8 directions (the previous 4 plus diagonal variants). Thus, setting the directions to 4 will only allow the fill to "flow" in the 4 cardinal directions, while setting it to 8 will allow the fill to flow across diagonal boundaries as well.

Tolerance

The Tolerance value specifies how exactly the color must match. It is a value from 0 to 255, with 0 indicating an exact match only. Note that setting the tolerance too high will reduce the effectiveness of the tool.

In Contiguous and All modes, the tolerance specifies the maximum difference between the color initially clicked and the surrounding colors. Since real-life photographs usually have some variation in "smoothly colored" regions, setting a slightly higher tolerance will help fill the entire region in one click.

In Bounded mode, a higher tolerance allows a less-exact bounding color match, at the cost of filling less pixels within this region. Note that setting the tolerance too low here may cause the entire image to be filled if an appropriate bounding region is not found.