First, the basics. A gradation (also called a gradient fill) is a progression of colors that fade gradually into one another, as demonstrated in Figure 6-9. You specify a few key colors in the gradation, and Photoshop automatically generates the hundred or so colors in between to create a smooth transition.
Figure 6-9: Dragging with the gradient tool within a single selection (left) and across multiple selections (right).
Note |
If you're accustomed to using gradients in a drawing program — such as Illustrator or FreeHand — you'll find that in many ways Photoshop is better. Because Photoshop is a pixel editor, it lets you blur and mix colors in a gradation if they start banding — that is, if you can see a hard edge between one color and the next when you print the image. And Photoshop's gradations never choke the printer or slow it down, no matter how many colors you add. In Illustrator, each band of color in an object-oriented gradation is expressed as a separate shape — so that one gradation can contain hundreds, or even thousands, of objects. Gradations in Photoshop are plain old colored pixels, the kind we've been editing for five and a half chapters. |
The gradient and paint bucket tools share a toolbox slot and a keyboard shortcut — press G to toggle between the two tools (or Shift+G, depending on whether you selected the Use Shift Key for Tool Switch check box in the Preferences dialog box, as discussed in Chapter 2). But unlike the paint bucket, which fills areas of similar color according to the Tolerance setting, the gradient tool affects all colors within a selection. If you don't select a portion of your image, Photoshop applies the gradation to the entire layer.
To use the tool, drag inside the selection, as shown in the left example of Figure 6-9. The point at which you begin dragging (the upper-left corner in the figure) defines the location of the first color in the gradation. The point at which you release (the lower-right corner) defines the location of the last color. If multiple portions of the image are selected, the gradation fills all selections continuously, as demonstrated by the right example of Figure 6-9.
As with other tools in Photoshop, the Options bar contains the gradient tool controls, which you can examine in Figure 6-10. If you don't see the Options bar, press Enter or Return when the gradient tool is active or double-click the tool icon in the toolbox.
Figure 6-10: The Options bar gives you quick access to all gradient tool options.
The following list explains how the controls in the Options bar work. In all cases, you must adjust the options before using the gradient tool. They do not affect existing gradations.
Gradient preview: The selected gradient appears in the gradient preview, labeled in Figure 6-10. Click the preview to open the Gradient Editor dialog box, discussed in the upcoming section "Creating custom gradations."
Gradient drop-down palette: Click the triangle adjacent to the preview to display the Gradient palette, which contains icons representing gradients in the current gradient presets. Click the icon for the gradient you want.
You load gradient presets using the same techniques that I describe in detail in the brush preset discussion in Chapter 5. Here's a brief recap:
Click the triangle near the top of the drop-down palette to display the palette menu. The Photoshop collection of presets and any presets that you defined appear at the bottom of the palette menu. Click a preset name to use the preset instead of the current preset or append the new preset to the current one.
To append a preset from disk — such as when a coworker gives you a preset file — choose Load Gradients from the palette menu or click Load in the Preset Manager dialog box. If you want to replace the current preset instead, choose Replace Gradients from the palette menu or click Replace in the dialog box. To return to the default gradients, choose Reset Gradients from the palette menu, either from the Options bar palette or the one in the Preset Manager dialog box.
Tip |
You can edit a gradient and perform the aforementioned preset juggling acts from the Gradient Editor dialog box, too. The upcoming "Creating custom gradations" section covers this dialog box. |
Gradient style: Click an icon to select the gradient style. The next section explains these five styles.
Mode and Opacity: These options work as they do for the paint and edit tools, the Fill command, and every other tool or command that offers them as options. Select a different brush mode to change how colors are applied; lower the Opacity value to make a gradation translucent. Remember that you can change the Opacity value by pressing number keys as well as by using the Opacity control in the Options bar. Press 0 for 100-percent opacity, 9 for 90-percent opacity, and so on.
Reverse: When active, this check box begins the gradation with the background color and ends it with the foreground color. Use this option when you want to start a radial or other style of gradation with white, but you want to keep the foreground and background colors set to their defaults.
Dither: In the old days, Photoshop drew its gradients one band at a time. Each band was filled with an incrementally different shade of color. The potential result was banding, in which you could clearly distinguish the transition between two or more bands of color. The Dither check box helps to eliminate this problem by mixing up the pixels between bands (much as Photoshop dithers pixels when converting a grayscale image to black and white). It's generally safe to turn off the Dither check box if you're working on an image in 16-bit mode. Otherwise, you should leave this option turned on unless you want to use banding to create a special effect.
Transparency: You can specify different levels of opacity throughout a gradation. For example, the Soft Stripes effect (available from the Gradient palette when the Special Effects preset is loaded) lays down a series of alternately black and transparent stripes. But you needn't use this transparency information. If you prefer to apply a series of black and white stripes instead, you can make all portions of the gradation equally opaque by turning off the Transparency check box.
For example, in Figure 6-11, I applied Soft Stripes as a radial gradation in two separate swipes (middle and bottom). Both times, I changed the Opacity setting to 50 percent, so the eye would never be completely obscured. (The Opacity setting works independently of the gradation's built-in transparency, providing you with additional flexibility.) In the top gradation (middle example), the Transparency check box is on, so the white stripes are completely transparent. In the bottom gradation, Transparency is turned off, so the white stripes become 50-percent opaque (as prescribed by the Opacity setting).
Figure 6-11: With the Opacity value set to 50 percent, I applied the Soft Stripes gradation with Transparency on (middle) and off (bottom). When Transparency is off, the white stripes obscure the view of the underlying image.
You select the gradient style by clicking the gradient style icons in the Options bar (refer back to Figure 6-10). Illustrated in Figure 6-12, the five styles are as follows:
Figure 6-12: Examples of each of the five gradient styles created using the default foreground and background colors (left column) and with the foreground and background colors reversed (right column). B marks the beginning of the drag; E marks the end.
Linear: A linear gradation progresses in bands of color in a straight line between the beginning and end of your drag. The top two examples in Figure 6-12 show linear gradations created from black to white, and from white to black. The point labeled B marks the beginning of the drag; E marks the end.
Radial: A radial gradation progresses outward from a central point in concentric circles, as in the second row of examples in Figure 6-12. The point at which you begin dragging defines the center of the gradation, and the point at which you release defines the outermost circle. This means the first color in the gradation appears in the center of the fill. So to create the gradation on the right side of Figure 6-12, you must set the foreground color to white and the background color to black (or select the Reverse check box in the Options bar).
Angle: The angle gradient style creates a fountain of colors flowing in a counterclockwise direction with respect to your drag, as demonstrated by the middle two examples of Figure 6-12. This type of gradient is known more commonly as a conical gradation because it looks like the bird's-eye view of the top of a cone.
Of course, a real cone doesn't have the sharp edge between black and white that you see in Photoshop's angle gradient. To eliminate this edge, create a custom gradation from black to white to black again, as I explain in the "Adjusting colors in a solid gradation" section later in this chapter. (Take a peek at Figure 6-17 later in this chapter if you're not sure what I'm talking about.)
Reflected: The fourth gradient style creates a linear gradation that reflects back on itself. Photoshop positions the foreground color at the beginning of your drag and the background color at the end, as when using the linear gradient style. But it also repeats the gradient in the opposite direction of your drag, as demonstrated in Figure 6-12. It's great for creating natural shadows or highlights that fade in two directions.
Diamond: The last gradient style creates a series of concentric diamonds (if you drag at a 90-degree angle) or squares (if you drag at a 45-degree angle, as in Figure 6-12). Otherwise, it works exactly like the radial gradient style.
The secret passageway to the Gradient Editor dialog box shown in Figure 6-13 — as you already know if you read the "Gradient options" section earlier in this chapter — is the color preview that appears at the left end of the Options bar. If you click the preview, you display the Gradient Editor dialog box. If you click the neighboring triangle, you display the Gradient palette, as shown earlier in Figure 6-10.
Figure 6-13: Click the gradient preview in the Options bar to display the Gradient Editor dialog box, which enables you to design custom gradations.
Here are some important points about the Gradient Editor:
The scrolling list at the top of the dialog box mirrors the Gradient drop-down palette in the Options bar and the Gradients panel of the Preset Manager dialog box. If you click the triangle at the top of the scrolling list, you display a virtual duplicate of the palette menu.
Tip |
If you want to see gradient names instead of icons in the list, choose Text Only from the dialog box menu. Or choose Small List or Large List to see both icon and gradient name. |
To create a new gradient, find an existing gradient that's close to what you have in mind. Then type a name for the gradient in the Name option box and click the New button. The new gradient appears in the scrolling list, and you can edit the gradient as you see fit.
Caution |
Even though the gradient appears in the dialog box (as well as in the Gradient palette and the Preset Manager dialog box), it's vulnerable until you save it as part of a preset. If you make further edits to the gradient or replace the current gradient preset, the original gradient is a goner. Deleting your main Photoshop preferences file also wipes out an unsaved gradient. See the upcoming section "Saving and managing gradients" for more details. |
You can create noise gradients as well as solid-color gradations. If you select Noise from the Gradient Type pop-up menu, Photoshop introduces random color information into the gradient, the result of which is a sort of special-effect gradient that would be difficult to create manually.
The options at the bottom of the dialog box change depending on whether you select Solid or Noise from the Gradient Type pop-up. For solid gradients, Photoshop provides a Smoothness slider, which you can use to adjust how abrupt you want to make the color transitions in the gradient.
TipFor greater control when creating or editing a gradient, make the dialog box wider by dragging the size box in the lower-right corner.
If you select Solid from the Gradient Type pop-up menu, you use the options shown in Figure 6-14 to adjust the gradient. (Note that this is a doctored screen shot — I made all the options visible in the figure, but normally, only some of these options are available at a time.)
Figure 6-14: Use these controls to adjust the colors and transparency in a solid gradient.
The fade bar (labeled in Figure 6-14) shows the active gradient. The starting color appears as a house-shaped color stop on the left; the ending color appears on the far right. The upside-down houses on the top of the fade bar are opacity stops. These stops determine where colors are opaque and where they fade into translucency or even transparency.
To select either type of stop, click it. The triangle portion of the stop appears black to show you which stop is active. After you select a stop, diamond-shaped midpoint markers appear between the stop and its immediate neighbors. On the color-stop side of the fade bar, the midpoint marker represents the spot where the two colors mix in exactly equal amounts. On the transparency side, a marker indicates the point where the opacity value is midway between the values that you set for the stops on either side of the marker.
You can change the location of any stop or marker by dragging it. Or you can click a stop or marker to select it and then enter a value in the Location option box below the fade bar:
When numerically positioning a stop, a value of 0 percent indicates the left end of the fade bar; 100 percent indicates the right end. Even if you add more stops to the gradation, the values represent absolute positions along the fade bar.
When repositioning a midpoint marker, the initial setting of 50 percent is smack dab between two stops, 0 percent is all the way over to the left stop, and 100 percent is all the way over to the right. Midpoint values are, therefore, measured relative to stop positions. In fact, when you move a stop, Photoshop moves the midpoint marker along with it to maintain the same relative positioning.
Figure 6-15 shows four black-to-white radial gradations that I created by setting the midpoint between the black and white color stops to four different positions. The midpoint settings range from the minimum to maximum allowable Location values. If you enter a value below 5 percent or over 95, Photoshop politely ignores you. In all cases, I set the opacity to 100 percent along the entire gradient.
Figure 6-15: Four sets of white-to-black gradations — radial on top and linear at bottom — subject to different midpoint settings.
Tip |
Pressing Enter or Return after you enter a value into the Location option box is tempting, but don't do it. If you do, Photoshop dumps you out of the Gradient Editor dialog box. |
When editing a solid gradation, you can add colors, delete colors, change the position of the colors in the gradient, and control how two colors blend together. After clicking a color stop to select it, you can change its color in several ways:
To change the color to the current foreground color, open the Color pop-up menu, as shown in Figure 6-16, and select Foreground. Select Background to use the background color instead.
Figure 6-16: A look at the color stop options in the Gradient Editor dialog box.
When you select Foreground or Background, the color stop becomes filled with a grayscale pattern instead of a solid color. If you squint real hard and put your nose to the screen, you can see that the pattern is actually a representation of the Foreground and Background color controls in the toolbox. The little black square appears in the upper-left corner when the foreground color is active, as shown in the first stop on the fade bar in Figure 6-16. The black square moves to the bottom-right corner when the background color is active, as shown in the end stop in the figure.
If you change the foreground or background color after closing the Gradient Editor dialog box, the gradient changes to reflect the new color. When you next open the Gradient Editor, you can revert the stop to the original foreground or background color by selecting User Color from the pop-up menu.
To set the color stop to some other color, click the Color swatch or double-click the color stop to display the Color Picker and define the new color. Select your color and press Enter or Return.
TipYou may have noticed that when you opened the Gradient Editor dialog box, Photoshop automatically selected the eyedropper tool for you and displayed that tool's controls in the Options bar. Here's why: You can click with the eyedropper in an open image window to lift a color from the image and assign that color to the selected color stop. You can also sample a color from anywhere on screen by first clicking with the eyedropper in an image window and then dragging outside it.
To change the point at which two colors meet, drag the midpoint marker between the two stops. Or click the midpoint marker and enter a new value into the Location box. As I mentioned earlier, a value of 0 puts the midpoint marker smack up against the left color stop; a value of 100 scoots the stop all the way over to the right stop.
You add or delete stops as follows:
To add a color stop, click anywhere along the bottom of the fade bar. A new stop appears where you click. Photoshop also adds a midpoint marker between the new color stop and its neighbors. You can add as many color stops as your heart desires. (But if your goal is a gradient featuring tons of random colors, you may be able to create the effect you want more easily by using the Noise gradient option, discussed shortly.)
To duplicate a color stop, Alt-drag (Option-drag on the Mac) it to a new location along the fade bar. One great use for this is to create a reflecting gradation.
For example, select Foreground to Background from the scrolling list of gradients and click New to duplicate the gradient. After naming your new gradient — something like Foreground to Background to Foreground — click the background color stop and change the Location value to 50. Then Alt-drag (Option-drag on the Mac) the foreground color stop all the way to the right. This new gradient is perfect for making true conical gradations with the angle gradient style, as demonstrated in Figure 6-17.
Figure 6-17: Two gradations created with the angle gradient style, one using the standard Foreground to Background gradient (left) and the other with my reflected Foreground to Background to Foreground style (right). Which looks better to you?
To remove a color stop, drag the stop away from the fade bar. Or click the stop and click the Delete button. The stop icon vanishes and the fade bar automatically adjusts as defined by the remaining color stops.
If you like, you can include a transparency mask with each gradation. The mask determines the opacity of different colors along the gradation. You create and edit this mask independently of the colors in the gradation.
To create a transparency mask, you play with the opacity stops across the top of the fade bar. When you click an opacity stop, the transparency options become available below the fade bar and the color options dim, as shown in Figure 6-18.
Figure 6-18: Click a stop along the top of the fade bar to adjust the opacity of the gradient at that location.
To add an opacity stop, click above the fade bar. By default, each new stop is 100-percent opaque. You can modify the transparency by selecting a stop and changing the Opacity value. The fade bar updates to reflect your changes. To reposition a stop, drag it or enter a value in the Location option box.
Midpoint markers represent the spot where the opacity value is half the difference between the opacity values of a pair of opacity stops. In other words, if you set one opacity stop to 30 percent and another to 90 percent, the midpoint marker shows you where the gradient reaches 60-percent opacity. You can relocate the midpoint marker, and thus change the spot where the gradient reaches that midrange opacity value, by dragging the marker or entering a new value in the Location option box.
Adobe describes a noise gradient as a gradient that "contains random components along with the deterministic ones that create the gradient." Allow me to translate: Photoshop adds random colors to the parameters that you set in the Gradient Editor dialog box. Did that help? No? Then take a look at Figure 6-19, which shows examples of three noise gradients. You could create these same gradients using the regular Solid gradient controls, but it would take you forever to add all the color and midpoint stops required to produce the same effect.
Figure 6-19: Here you see three gradients created using the Noise option in the Gradient Editor dialog box. I created the first two using two different Roughness values; for the bottom example, I used the same Roughness value as in the middle example but selected the Add Transparency option.
To create a noise gradient, select Noise from the Gradient Type menu in the Gradient Editor dialog box, as shown in Figure 6-20. You can adjust the gradient as follows:
Figure 6-20: Use the Noise gradient option to create gradients like the ones you see in Figure 6-19.
Raise the Roughness value to create more distinct bands of color, as in the middle example in Figure 6-19. Lowering the Roughness value results in softer color transitions, as you can see from the top example, which I set at one half the Roughness value of the middle example.
Use the color sliders at the bottom of the dialog box to define the range of allowable colors in the gradient. You can work in one of three color modes: RGB, HSB, or Lab. Select the mode you want from the pop-up menu above the sliders.
The Restrict Colors option, when selected, adjusts the gradient so that you don't wind up with any oversaturated colors. Deselect the option for more vibrant hues.
If you select Add Transparency, Photoshop adds random transparency information to the gradient, as if you had added scads of opacity stops to a regular gradient. In the bottom example of Figure 6-19, I started with the gradient from the middle example, selected the Add Transparency check box, and left the Roughness value at 100.
Click the Randomize button, and Photoshop shuffles all the gradient colors and transparency values to create another gradient. If you don't like what you see, just keep clicking Randomize until you're satisfied. Note that each click of the Randomize button produces a radically different gradient, so if you find a gradient that's close to what you're looking for, you might want to save it as a preset and continue tweaking it by hand.
Tip |
For some really cool effects, try applying special effects filters to a noise gradient. Figure 6-21 shows the results of applying the Gaussian Blur, Twirl, and Ripple filters on the original noise gradient shown in the upper-left example. Figure 6-21: I applied three effects filters to the original noise gradient to create some interesting random patterns. |
When you define a new gradient, its icon appears in the palette, the Preset Manager dialog box, and the Gradient Editor dialog box. But if you replace the current gradient set or edit the gradient, the original gradient gets trashed. You also lose the gradient if you delete your Photoshop CS preferences file because that's where the temporary gradient information is stored.
If you want to preserve a gradient, you must save it as part of a preset — which is nothing more than a collection of gradients. As I mentioned earlier, Photoshop ships with several gradient presets stored in the Gradients folder, which lives inside the Presets folder in the main Photoshop program folder. You also can create as many custom presets as you like. Gradient presets have the file extension .grd.
You can save all the gradients in the active preset — including any custom gradients that you defined — by clicking Save in the Gradient Editor dialog box or by choosing Save Gradients from the Gradient palette pop-up menu. But if you want to save only some of the current gradients as a preset, choose Preset Manager from the Gradient palette pop-up menu and then display the Gradients panel, shown in Figure 6-22, by pressing Ctrl+3 (z -3 on the Mac) or by choosing Gradients from the Preset Type pop-up menu. Shift-click the gradients you want to save and then click Save Set. If you want to dump the selected gradients into an existing preset, select the preset file and press Enter or Return. Alternatively, you can enter a new preset name to create a brand-new preset that contains only the selected gradients.
Figure 6-22: To select specific gradients and save them as a new preset, use the Preset Manager.
To delete a gradient, Alt-click (Option-click on the Mac) its icon in the palette, the Preset Manager, or the Gradient Editor dialog box. To delete multiple gradients, Shift-click the gradients in the Preset Manager and then click the Delete button. Save the preset immediately if you want the deleted gradients gone for good; otherwise, they remain an official part of the preset and reappear the next time you load the preset.
All standard brush modes are available when you apply gradations, and they make a tremendous impression on the performance of the gradient tool. This section examines one way to apply a brush mode in conjunction with the tool. Naturally, this section barely scrapes the surface of what's possible, but it may inspire you to experiment and discover additional effects on your own.
The following steps tell you how to use the Dissolve mode with a radial gradation to create a supernova. (At least, it looks like a supernova to me — not that I've ever seen one up close, mind you.) Figures 6-23 through 6-25 show the supernova in progress. The steps offer you the opportunity to experiment with a brush mode setting and some general insight into creating radial gradations.
Cross-Reference |
These steps involve the use of the elliptical marquee tool. Generally it's an easy tool to use. But if you find that you have problems making it work according to my instructions, you may want to read the "Geometric selection outlines" section of Chapter 8. It's only a few pages long. |
Create a new image window. Make it 500500 pixels. A grayscale image is fine for this exercise.
Use guides to pinpoint the center of your image. If rulers aren't already visible, press Ctrl+R (z -R on the Mac) to turn them on. Right-click (Control-click on the Mac) on a ruler and make sure that the unit of measurement is set to pixels. Then drag from each ruler to set a guide at the 250-pixel point. The intersection of the two guides will be in the exact center of your image.
Alt-drag (Option-drag on the Mac) from the center point with the elliptical marquee tool to draw the marquee outward from the center. While dragging with the tool, press and hold Shift to constrain the marquee to a circle. Release Shift after you release the mouse button. Draw a marquee that fills about 3/4 of the window.
Choose Image Adjustments Invert. Or press Ctrl+I (z -I on the Mac). This fills the marquee with black and makes the center point white.
Choose Select Deselect. Or press Ctrl+D (z -D on the Mac). As the command name suggests, this deselects the circle.
Again, Alt-drag (Option-drag on the Mac) from the center point with the elliptical marquee tool. And, again, press Shift to constrain the shape to a circle. Create a marquee roughly 20 pixels larger than the black circle.
Once again, Alt-drag (Option-drag on the Mac) from the center point with the elliptical marquee tool. This subtracts a hole from the selection. After you begin dragging, release Alt (Win) or Option (Mac), but keep that mouse button down. Then press and hold both Shift and Alt (Win) or Shift and Option (Mac) and keep them down. Draw a marquee roughly 20 pixels smaller than the black circle. Release the mouse button and finally release the keys. The result is a doughnut-shaped selection — a large circle with a smaller circular hole — as shown in Figure 6-23.
Figure 6-23: The result of creating a black circle and two circular marquees, all centered about a single point (represented here by a small crosshair).
Choose Select Feather and enter 10 for the Radius value. Then press Enter or Return to feather the section outline.
Press D and then press X. This makes the foreground color white and the background color black.
Select the gradient tool and click the radial gradient icon in the Options bar. That's the second icon from the left with the white circle at its center. (Flip back to Figure 6-12 if you still don't know what I mean.)
Open the Gradient palette and select the Foreground to Background gradient. Assuming that you have the default gradients preset loaded and haven't altered the preset, the icon is the first one in the palette.
Select Dissolve from the Mode menu in the Options bar.
Drag from the center point in the image window to anywhere along the outer rim of the largest marquee. The result is the fuzzy gradation shown in Figure 6-24.
Figure 6-24: The Dissolve brush mode option randomizes the pixels around the feathered edges of the selection outlines.
Choose Select Deselect to deselect the image. Or press Ctrl+D (z -D on the Mac).
Choose Image Adjustments Invert to invert the entire image. Or press Ctrl+I (z -I on the Mac).
Press D to restore black and white as foreground and background colors, respectively. Then choose View Clear Guides. The finished supernova appears in Figure 6-25.
Figure 6-25: By inverting the image from the preceding figure and erasing the center point, you create an expanding series of progressively lighter rings dissolving into the black void of space, an effect better known to its friends as a supernova.