Home  >  Tutorials  >   PSP 9 Tutorials  >
Learning PSP 9, Lesson 10:  >
Tools: The Flood Fill Tool
E-mail this tutorial to a friend Email to a Friend

Tools:
The Flood Fill Tool
Created by: Prof

 
This series of tutorials is oriented toward helping those new users of PSP 9 to learn the basics of this great graphic program. The tutorials are written to introduce the basic features, tools and palettes and build upon one another. Also, the tutorials may be used as a reference for using particular tools, palettes and features of PSP.
 

The Flood Fill Tool

The Flood Fill tool is used to paint an area/selection of the canvas. This tool is very simple to use and we have used it in previous tutorials. This tool, however, has some very interesting options that allow for creating some very interesting graphics without using any other tool beyond the Selection tool and some of the selections options.

Purpose and Goal of this Tutorial

We will explore the basic options in using the Flood Fill tool and then create an interesting graphic as an exercise.

  • The Flood Fill Tool and its Options
  • A Creative Example
 
Flood Fill Tool


New Image

Flood Fill Tool  Reset to Default









The Flood Fill Tool

For our illustrations use a new image, 300 x 300 Pixels, 16 million colors, white background. Then, click on the Flood Fill tool in the Tools toolbar, click on Presets in the Tool Options palette and set to default. Notice also there are no preset options available.

Match Mode allows one to set how Flood Fill will work with regard to how it fills pixels. We will explore some of these later. The default setting is 'RGB values' and will fill all contiguous areas that match the RGB value of the pixel below the cursor.

Tolerance sets how close the color of contiguous pixels can be for the flood-filled area. The lower the tolerance the more exact the values need to be.

Sample merged, when unchecked, uses only the current-layer pixels. When checked, the color value is the merged values of all pixels on all layers.

Blend mode sets the mode for the flood-fill and is the same blend modes that one could set in the Layer palette. Using this option requires knowing how the painting will blend, so often trial and error is used. And more than not this option will not be used until one is very advanced in using PSP and color blending.

Opacity sets the painting's transparency from none (100%) to full (0%).

 
New Image

Selection Tool     Flood Fill Tool



The 'RGB Values' and 'None' Match Modes

In this example we will see how the match modes of 'None' and 'RGB values' work.

  • Create a new image, 300 x 300 Pixels, 16 million colors, white background.
  • Draw a rectangular selection more at the top and center. Start with the default settings and flood-fill with a blue color.
  • Select red for your color. Draw another rectangle intersecting the top right corner of the blue rectangle. Set the Match Mode to 'RGB values'. Flood-fill this selection by having the cursor in a blue area of the rectangle.
  • Draw another rectangle intersecting the bottom right corner of the blue rectangle. Flood-fill it by placing the cursor in a white area of the selection.
  • Set color to green. Draw an intersecting rectangle the top left part of the blue rectangle. Set the Match Mode to 'None'. Place your cursor in the blue area of the selection and flood-fill.
  • Draw a final intersecting rectangle at the bottom left of the blue rectangle. Flood-fill by placing the cursor in a white area of the selection.

Using 'None' one can flood-fill the complete selection. Using 'RGB values' one flood-fills only the area of the color where the cursor is placed. There will be times when one wants to just flood-fill a small area of another colored area. One could use this RGB option to accomplish that task. However, the color being changed will need to be mostly a solid color.

 
New Image     Flood Fill Tool

Other Flood-Fill Options

In these examples we will use a multi-colored background by using a gradient and then try other flood-fill options on this background. For these examples, we will only change the Match Mode values. Also note that we are not using any selections as the multi-colors in the gradient will define the areas we use.

  • New image, 300 x 300 Pixels, 16 million colors, white background.
  • Select the 'Multi-Aqua' gradient for your foreground material.
  • Flood-fill the canvas.

The setting used for all the following examples is:
– Tolerance = 5 (but note that in the 'None' Match Mode
                        Tolerance is grayed out)

For the first example (not illustrated here) use:
– Match Mode = None

Choose any color or pattern. Flood-fill and note that the background will change completely to the color or pattern, gradient chosen or fills all pixels.

 
  • Set the color to Solid Red and Match Mode = RGB values
  • Flood-fill in the green circle outside of the dark blue circle where the dark green blends into a lighter green.

Note how the red circle is fairly thin. 'RGB values' fills contiguous pixels that match the red, green, and blue values.

 
  • Set the color to Solid Red and Match Mode = Color
  • Flood-fill in the same place as above – green circle outside of the dark blue circle where the dark green blends into a lighter green.

Note how the red circle is thicker. 'Color' fills contiguous pixels that match the hue and saturation values.

 
  • Set the color to Solid Red and Match Mode = Hue
  • Flood-fill in the same place as above – green circle outside of the dark blue circle where the dark green blends into a lighter green.

'Hue' fills contiguous pixels that match the hue value.

 
  • Set the color to Solid Red and Match Mode = Brightness
  • Flood-fill in the same place as above – green circle outside of the dark blue circle where the dark green blends into a lighter green.

Note that 'Brightness' looks similar to 'RGB values' but is actually more outside of the RGB flood-fill. Also, the same area chosen will have the same Brightness values. 'Brightness' fills contiguous pixels that match the brightness.

 
New Image     Flood Fill Tool



New Raster Layer

To illustrate the Match Modes of 'All Opaque' and 'Opacity' we need a new image, 300 x 300 Pixels, 16 million colors, transparent background.

In the Materials palette, click into the Foreground Materials box to open the Materials dialog window, select a solid color (I am using blue),select the Gradient tab and choose the 'Fading Foreground' gradient.

Make sure the flood-fill option of Opacity = 100 and flood-fill the canvas.

We also want to see how 'Sample merged' works, so set: – Sample merged = checked
– Tolerance = 20

Create a new top layer.

 
  • In Match Mode, select 'All Opaque' which means flood-fill will fill all pixels that are opaque or not transparent.
  • Choose a contrasting color such as white and flood-fill the top layer. The result will be that the whole layer will flood-fill with the color because the bottom layer is a gradient in which all pixels have colors but of varying transparency ('Sample merged' has been checked so the pixels on the bottom layer are also used).
  • Press the Delete key (in the top layer!) to remove all color from that layer.
  • Set Match Mode = Opacity which means flood-fill will fill contiguous pixels that match the opacity.
  • Put your cursor somewhere on the canvas and flood-fill.
  • As illustrated on the left, just a portion of the gradient pattern is filled with the color.
 

Creating an Eye Graphic

In this example, we will be using the Flood Fill tool and its various options to create an eye. We will be using selections and feathered selections so if you have not worked through the tutorials on Selections you might want to do those tutorials first. This example will be created on a single layer.

 
New Image



Selection Tool










Materials Palette - Materials Box  Materials Gradient Option



Flood Fill Tool



Create a new image, 300 x 300 Pixels, 16 million colors, white background.

Use the Selection tool:
– Selection type = Ellipse
– Mode = Replace
– Feather = 0
– Anti-alias = checked

Draw an ellipse about 1 1/2 inches wide and in its center about 3/4 inches high: Use the Status bar to locate the coordinates, place your cursor in the center of the image (x:150 y:150), and draw out the ellipse to the coordinates (218, 169).

In the Materials palette, set the Foreground Material to Gradient, click into the Foreground Materials box and set:
– Gradient = Multi-aqua
– Style = Sunburst
– Repeats = 0
– Horizontal and Vertical Center Point = 50

Flood-fill the selection with Flood Fill tool set to:
– Match mode = None
– Tolerance = 0
– Sample merged = unchecked
– Blend mode = Normal
– Opacity = 100

Deselect (Selections || Select None or Ctrl+D).

 


Materials Palette - Materials Box  Materials Solid Color Option

Selection Tool






Flood Fill Tool
















Creating the Eye Lid

Set the Foreground Material to Solid Color using a dark tan (Red = 163, Green = 135, Blue = 85; #a38755).

With the Selection tool, draw another ellipse starting in the center (x:150 y:150) and draw out to the coordinates (222, 188).

Go to Selections || Modify || Inside/Outside Feather:
– Inside = checked
– Feather amount = 10

Set the Flood Fill tool to
– Match mode = Brightness
– Tolerance = 70
(If the Tolerance box is grayed out, first set the Match Mode to 'RGB values', then set the Tolerance and then set the Match mode to Brightness.)

Place your cursor in a white area of the selection surrounding the eye and flood-fill.

Go to Selections || Modify || Inside/Outside Feather:
– Outside = checked
– Feather amount = 6

Set the Flood Fill tool to
– Match Mode = Brightness
– Tolerance = 20
– Opacity = 50

Place your cursor again in a white area and flood-fill. If it does not fill all the way around, go to the other area and flood-fill again in a white area.

Do not deselect yet.

 

Now let's put some skin color around the eye:

Set your Foreground Color to a light tan (Red = 223, Green = 210, Blue = 187; #dfd2bb).

Go to Selections || Modify || Inside/Outside Feather:
– Outside = checked
– Feather amount = 120

Set the Flood Fill tool to:
– Match mode = RGB values
– Tolerance = 30

Place your cursor in a white area of the selection surrounding the eye and flood-fill. You may need to flood-fill more than once to darken the color (I flood-filled 3 times). Deselect (Ctrl+D).

 








And finally, let's put white into the eye and create a darker pupil:

Set your Foreground Color to White.

In the Flood Fill Tool Options palette, set:
– Match mode = Color
– Tolerance = 15
– Opacity = 90

In the center of the green area, flood-fill both sides for the white of the eye.

In the Materials palette, click on the Foreground Materials box and then grab the dark blue ring color (the cursor should look like the Dropper tool) (Red = 0, Green = 91, Blue = 128; #005680).

Flood Fill tool settings:
– Match Mode = Color
– Tolerance = 4
– Opacity = 50

Place your cursor in a blue area around the light blue that is around the center point and flood-fill.

Reset Opacity = 30, place the cursor in the light blue inside the blue just done in the above step and flood-fill again.

 

Closing Remarks

Using the Flood Fill tool and learning how its Tool Options palette values effect the results of a flood-fill allows one to create other areas of colors without necessarily having to create new layers above and/or below a layer where one wants to add colors. Also, though we did not explore the different modes as this requires some knowledge of how they blend with colors below, one could also use that option when flood-filling selections.

The illustration of an eye demonstrates how selections and flood-fill with its various options can be used to create pictures, shapes, etc. Certainly, one could even enhance the eye graphic by using a Paint Brush to affix eye lashes, giving some more definition to the lid, but the illustration shows one interesting way to use the Flood Fill tool.

Enjoy.