What the fill command does and when you need it
The fill command is the fastest way to color in a large area of your design without painting it by hand. You click on a closed shape or a region of similar color, and the software floods that entire area with your chosen color in one action. Most design programs call it "fill" or "bucket fill" — the icon usually looks like a paint bucket tipping over.
You use fill when you have a shape you drew (a rectangle, circle, or custom path) and want to put solid color inside it. You also use it when you have a photograph or scanned image and want to change the color of a specific region — say, turning a white background to blue, or changing someone's shirt from red to green. The fill command works only on areas that are completely enclosed, so if your shape has a gap, the color will leak out into the surrounding space.
Key Takeaways
- The fill command colors in a closed shape or region with one click, and works best when the area you want to fill is completely enclosed with no gaps.
- You choose your fill color before you click, using the color picker or color palette in your toolbar.
- The tolerance setting controls how similar neighboring pixels need to be to get filled — lower tolerance is stricter, higher tolerance fills more area at once.
- If fill leaks into areas you did not intend to color, your shape has a gap, or your tolerance is set too high.
Setting your fill color before you start
Every design program keeps a foreground color (or primary color) that the fill command will use. Before you fill anything, you need to set this color to what you want. Look in your toolbar for a color swatch — usually a small square showing the current color. Click on it to open the color picker.
In the color picker, you can type in a specific color code (like #FF5733 for a shade of orange), use the color wheel or gradient to pick by eye, or click on a saved color from your palette. Once you have chosen, click OK or confirm, and that color becomes your foreground color. Now when you use fill, it will use that color.
If you want to fill with a pattern instead of a solid color, look for a "Pattern" tab or option in the fill dialog. Most programs let you choose from built-in patterns or load your own. Patterns work the same way as solid colors — you set them before you fill.
Using fill on a shape you drew
If you drew a rectangle, circle, or custom shape using the shape tools or pen tool, filling it is straightforward. Select the fill tool (bucket icon) from your toolbar. Then click once inside the shape. The entire shape floods with your foreground color when ready.
This works because the shape is a closed path — the software knows exactly where the boundary is. If nothing happens when you click, the shape may not be fully closed. Check that the start and end points of your path connect, or that the shape tool created a complete outline. In some programs, you may also need to make sure the shape is on a layer that supports fills, or that you are not in a mode that locks the layer.
Using fill on a photograph or scanned image
When you fill a photograph or scanned image, the software looks at the color of the pixel you clicked on and fills all neighboring pixels that are similar enough in color. This is where the tolerance setting matters. Tolerance is a number (usually 0 to 100) that tells the software how different a pixel can be and still count as "similar enough" to fill.
Low tolerance (like 5 or 10) means the software only fills pixels that are almost exactly the same color as the one you clicked. This is useful when you want to change only one specific shade — for example, filling in a white background without touching the light gray shadows. High tolerance (like 50 or 80) means the software fills a much wider range of similar colors at once. This is useful when you want to change a whole region that has slight color variation, like a sky that is darker at the top and lighter at the horizon.
To adjust tolerance, look for a "Tolerance" slider or number field in the fill tool options (usually a panel on the right side of the screen, or in a dialog that opens when you select the fill tool). Change the number and try again. You may need to undo your last fill and experiment with a few different tolerance values to get the result you want.
Fixing fill that goes where you do not want it
The most common problem is that fill leaks into areas you did not intend to color. This happens because your shape or region has a gap — even a tiny one — and the software treats the gap as an opening that the color can flow through. To fix this, undo the fill (Ctrl+Z or Cmd+Z), close the gap, and try again.
To close a gap in a drawn shape, use the pen tool to add a line segment that connects the two endpoints, or use the eraser to clean up stray pixels. If you are filling a photograph and the color is leaking into a neighboring region, your tolerance is too high. Undo, lower the tolerance number, and click again.
Another reason fill might not work is if you are on a locked layer or a layer type that does not support fills (like a text layer). Check that the layer you want to fill is unlocked and is a regular image or shape layer. If you are still stuck, try creating a new empty layer above your image, setting the layer blend mode to "Color" or "Overlay", and filling on that layer instead. This lets you change color without modifying the original image.
Fill with contiguous vs. all similar colors
Most design programs let you choose whether fill should color only the connected region you clicked on, or all regions of similar color in the entire image. This option is usually called "Contiguous" (meaning connected) or "Fill Similar". When contiguous is on, fill spreads outward from where you clicked until it hits a different color, then stops. When it is off, fill colors every pixel in the image that matches your tolerance, even if those pixels are far apart.
Use contiguous fill when you want to change only one region — like filling a single cloud in a sky without touching other clouds. Turn contiguous off when you want to change all instances of a color at once — like turning every white pixel in an image to gray. You can usually toggle this with a checkbox in the fill tool options.
Frequently Asked Questions
Why does the fill tool not work when I click?
The most common reason is that your shape or region is not fully closed. Check for gaps in the outline, especially at corners or where paths meet. If you are filling a photograph, make sure you clicked inside the area you want to fill, not outside it. You may also need to unlock the layer or switch to a layer type that supports fills.
How do I fill only part of a shape without filling the whole thing?
Use the selection tool to select just the area you want to fill, then use fill. The color will only go into the selected area. Alternatively, draw a separate shape on top for the part you want to color, and fill that shape instead.
Can I undo a fill if I do not like the color?
Yes. Press Ctrl+Z (Windows) or Cmd+Z (Mac) to undo the last fill. You can then choose a different color and fill again. Most programs let you undo multiple times, so you can go back several steps if needed.
What is the difference between fill and paint brush?
Fill colors an entire closed area in one click. Paint brush lets you draw by hand and colors only where you drag the brush. Use fill for large solid areas and shapes; use paint brush for detail work and freehand drawing.
How do I fill with a gradient instead of a solid color?
Most programs have a separate gradient tool, not a fill command option. Select the gradient tool, choose your gradient colors, then drag across the area you want to color. Some programs also let you set a gradient as the fill color and then use the fill tool, but this varies by software.