What the fill command does and when to use it

The fill command (sometimes called the bucket fill tool or paint bucket) floods a selected area or enclosed region with a solid color, pattern, or gradient. It is one of the fastest ways to change the color of a large area without having to paint it manually stroke by stroke.

You will use fill when you want to change a background color, recolor an object that has a clear edge, or quickly block in a solid area of color. It works best on images where the area you want to fill has a defined boundary — either because you selected it first, or because the pixels around it are a different color from the pixels inside.

The fill command is different from painting or drawing tools because it works on entire regions at once rather than following your brush strokes. This makes it much faster for large, uniform areas, but less precise for detailed work.

Key Takeaways

  • The fill tool floods a selected area or a region of similar color with a new color, pattern, or gradient in a single action.
  • Most fill tools have a tolerance setting that controls how similar neighboring pixels must be before they are included in the fill.
  • You can fill a selection you made with another tool, or use the fill tool to automatically detect and fill regions based on color similarity.
  • Fill works best on images with clear edges and distinct color regions; it may produce rough or incomplete results on soft edges or gradients.
  • The undo command (Ctrl+Z on Windows, Command+Z on Mac) reverses a fill instantly if the result is not what you wanted.

How to fill a selected area in Photoshop or similar editors

If you have already made a selection using the rectangle select tool, lasso tool, or magic wand, you can fill that selection with color. Go to the Edit menu and choose Fill. A dialog box will appear asking what you want to fill with — usually Foreground Color, Background Color, or a Pattern. Choose your option and click OK.

The selection acts as a boundary, so the fill will not spread beyond the edges you selected. This is the safest way to use fill because you control exactly where the color goes. If the result is not what you wanted, press Ctrl+Z (Windows) or Command+Z (Mac) to undo.

You can also set your foreground color before you fill. Click on the foreground color square in your toolbox, choose a color from the color picker, and click OK. Then make your selection and use Edit > Fill > Foreground Color.

Using the bucket fill tool to fill by color similarity

The bucket fill tool (or paint bucket tool) is usually found in the left toolbar and looks like a tilted bucket pouring paint. Click it to activate it. Then click on any area of your image, and the tool will automatically fill that area and any adjacent pixels of similar color.

The tolerance setting controls how similar the colors need to be. A low tolerance (around 10–20) fills only pixels very close in color to the one you clicked on. A high tolerance (50–100) includes a wider range of similar colors. If your fill stops short of where you wanted it to go, increase the tolerance. If it spreads into areas you did not want, lower it.

Most editors let you set tolerance before you click. Look for a tolerance slider or number field in the tool options panel, usually at the top of the screen or in a separate panel on the right. Adjust it, then click on your image.

Filling with patterns and gradients instead of solid colors

Instead of filling with a solid color, you can fill with a pattern or a gradient. In Photoshop, go to Edit > Fill and choose Pattern from the dropdown menu. A second dropdown will appear showing available patterns. Select one and click OK.

To fill with a gradient, you will usually need to use the gradient tool instead of the fill command. Select the gradient tool from the toolbar, choose your gradient colors, and drag across the area you want to fill. The gradient will transition smoothly from one color to another along the direction you dragged.

Patterns and gradients are useful for creating texture, depth, or visual interest in large areas. Patterns repeat a small image across the fill area, while gradients create a smooth color transition.

Fixing common fill problems

If your fill spreads into areas you did not intend, the tolerance is too high or there is a gap in the edge you thought was closed. Lower the tolerance and try again, or check that the boundary around your target area has no breaks. You can also make a selection first to prevent the fill from spreading at all.

If your fill does not reach all the way to the edge, the tolerance is too low. Increase it and click again. Alternatively, you can use the magic wand or select by color tool to select the entire region first, then use Edit > Fill to fill the selection with a solid color.

If the fill looks rough or jagged at the edges, you may be working on an image with soft or feathered edges. Try enabling anti-aliasing in the tool options, which smooths the edge of the fill. If the edge is still rough, you may need to use a selection tool with feathering instead.

When to use fill versus other color-change tools

Use fill when you have a large, uniform area of one color that you want to change to another color quickly. Use the paintbrush or pencil tool when you need precise control over where the color goes, or when you are working on small details. Use the selection tools (rectangle, lasso, magic wand) when you need to define a boundary before applying color.

The magic wand tool (also called select by color) is similar to the bucket fill tool, but it selects pixels instead of filling them. Use magic wand when you want to select a region first and then apply multiple changes to it, or when you want to be certain of your selection before committing to a fill.

Frequently Asked Questions

Can I undo a fill if I make a mistake?

Yes. Press Ctrl+Z (Windows) or Command+Z (Mac) immediately after the fill to undo it. Most editors keep a history of recent actions, so you can undo multiple steps if needed. Look for the Edit menu and choose Undo, or check the History panel to step back through your recent work.

Why does the fill tool not work when I click?

The most common reason is that the layer you are clicking on is locked or hidden. Check the Layers panel on the right side of the screen and make sure the layer is visible (eye icon showing) and unlocked (no lock icon). If you are working on a text layer or adjustment layer, you may need to switch to a regular image layer first.

How do I fill only part of an image without affecting the rest?

Make a selection first using the rectangle select, lasso, or magic wand tool. The selection acts as a boundary, so the fill will not spread beyond it. Then use Edit > Fill or the bucket fill tool to fill only the selected area.

What is the difference between tolerance and feathering?

Tolerance controls how similar colors must be to be included in a fill. Feathering softens the edge of a selection so the fill fades gradually rather than stopping abruptly. Use tolerance to control which pixels get filled; use feathering to control how the edge looks.

Can I fill with a custom color I created?

Yes. Click on the foreground color square in your toolbox to open the color picker. Choose or create your color, then click OK. The foreground color is now set to your custom color. Use Edit > Fill > Foreground Color, or click with the bucket fill tool to apply it.