Retouching and restoring images : Filling areas with colors, gradients, or patterns
 
Filling areas with colors, gradients, or patterns
You can fill a selection or a layer with the foreground or background color, gradient, or pattern. You can fill all pixels or fill only those pixels that match the options you specify. When you click in the image, the Flood Fill tool finds and fills all contiguous pixels that match the pixel you select.
Contiguous pixels are like continuous chains of matching pixels radiating from the initial pixel you click. When the Flood Fill tool finds a pixel that does not match the selected pixels, the chain breaks. Even if a pixel is only one pixel away from a matching pixel, it is treated as discontiguous.
What is the difference between the Flood Fill tool and the Color Replacer tool?
The Flood Fill tool can fill pixels that match certain criteria (such as RGB value); in this way, it is similar to the Color Replacer tool.
The Flood Fill tool fills matching pixels that are contiguous to the initial pixel you click, whereas the Color Replacer tool changes pixels either within its brushstrokes or in the entire layer.
The Color Replacer tool changes the color of pixels based on RGB value. The Flood Fill tool changes pixels based on RGB, hue, brightness, or opacity values.
To fill an area with a color, gradient, or pattern
Edit tab 
1 On the Tools toolbar, choose the Flood Fill tool .
2 Choose the foreground or background color, gradient, or pattern with which to fill the area.
3 From the Match Mode drop-list on the Tool Options palette, choose one of the following options:
None — fills all pixels
RGB Value — fills pixels that match the red, green, and blue values of the pixel you click
Color — fills pixels that match the shading variations of the pixel you click
Brightness — fills pixels that match the perceptual lightness value of the pixel you click
Perceptual — fills pixels that match the perceptual shading variation and lightness of the pixel you click
Traditional — fills pixels that match red, green, and blue values, with a bias toward lightness variations. This match mode is therefore more discriminating than the RGB Value match mode.
All Opaque — fills all pixels that are not completely invisible (that is, having an opacity value of 1 or greater). Choosing this option disables the Tolerance control.
Opacity — fills pixels that match the opacity value of the pixel you click
4 Type or set a value from 0 to 200 in the Tolerance control to specify how closely the selected pixels match the initial pixel you click.
At lower settings, only pixels with very similar colors are filled; at higher settings, more pixels are filled.
5 Choose an option from the Blend Mode drop-list to specify how filled pixels are blended with pixels of underlying layers.
The blend modes are the same as the layer blend modes.
6 Type or set a value in the Opacity control to specify the opacity of the fill.
At 100 percent opacity, the paint covers everything; at 1 percent opacity, the paint is almost completely transparent.
7 Position the cursor over the area of the selection or image that you want to fill, and either click to fill with the foreground material or right-click to fill with the background material.
To limit changes to a specific area, make a selection in the image before you apply the Flood Fill tool. For information about selections, see Working with selections.
You can limit the flood fill to matching pixels of the current layer only by unmarking the Use all layers check box.
For more information about using blend modes, see Blending layers. For more information about choosing brush options, see Choosing brush options.