Photoshop.CS.Bible [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Photoshop.CS.Bible [Electronic resources] - نسخه متنی

Deke McClelland

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید






Filling Selections with Color or Patterns


You can fill an area of an image in the following ways:



The paint bucket tool: Also known as the fill tool, the paint bucket resides in the same flyout as the gradient tool in the toolbox. You can apply the foreground color or a repeating pattern to areas of related color in an image by clicking in the image window with the tool. For example, if you want to turn all midnight blue pixels in an image into red pixels, set the foreground color to red and then click one of the blue pixels. Note that you can't use this tool on images that you converted to Bitmap mode.



The Fill command: Choose Edit Fill to fill a selection with the foreground color or a repeating pattern. You don't need to select a portion of the image to access the Fill command. If you choose the command while no selection is active, Photoshop fills the entire layer.





Tip

To choose the Fill command without so much as moving the mouse, press Shift+Backspace (Shift-Delete on the Mac).




Backspace (Win) and Delete (Mac) key techniques: After selecting part of a single-layer image — or part of the background layer in a multilayered image — you can fill the selection with the background color by pressing Backspace (Win) or Delete (Mac). You can also fill any layer with the background color without a selection by pressing Ctrl+Backspace (Win) or z -Delete (Mac). To fill with the foreground color, press Alt+Backspace (Win) or Option-Delete (Mac).



The gradient tool: Drag across a layer or selection with a gradient tool to fill it with a multicolor gradation in one of five gradient styles. You choose a gradient style by clicking an icon in the Options bar. Press G (or Shift+G, depending on your preferences setting for tool toggles) to toggle the gradient and paint bucket tools, which occupy the same flyout menu in the toolbox.



Layer fills: Photoshop provides two additional ways to fill an entire layer. You can use the dynamic fill and Layer Style features to fill a layer with a solid color, gradient, or pattern.



The next sections explain the first four fill options. To find out more about dynamic fills and layer styles, trek off to Chapter 14.


The paint bucket tool


Unlike remedial paint bucket tools in other painting programs, which apply paint exclusively within outlined areas or areas of solid color, the Photoshop paint bucket tool offers several useful adjustment options. You access the paint bucket controls in the Options bar, as with all tools. When you select the paint bucket, the Options bar automatically updates to show the available controls. If you don't see the Options bar, press Enter or Return, double-click the paint bucket icon in the toolbox, or choose Window Options.

Here's a look at the paint bucket options:



Fill: In this pop-up menu, choose whether you want to apply the foreground color or a repeating pattern. If you choose the latter, you can use one of Photoshop's preset patterns or one you created using Edit Define Pattern. The Define Pattern command is covered in the "Applying Repeating Patterns" section of Chapter 7.



Pattern: If you select Pattern from the Fill pop-up, click the Pattern icon (or the adjacent triangle) to display the Pattern drop-down palette, as shown in Figure 6-1. The palette contains icons representing the patterns in the current preset. Click the pattern you want to use.


Figure 6-1: These options govern the performance of the paint bucket tool.

You load, replace, edit, and create pattern presets just as you do tool and brush presets (see Chapters 2 and 5, respectively), working either in the Preset Manager dialog box or the Pattern palette menu, which you display by clicking the triangle labeled in Figure 6-1. Photoshop lets you create multiple patterns; you're not limited to one custom pattern.



Tolerance: Raise or lower the Tolerance value to increase or decrease the number of pixels affected by the paint bucket tool. The Tolerance value represents a range in brightness values, as measured from the pixel that you click with the paint bucket.

Immediately after you click a pixel, Photoshop reads the brightness value of that pixel from each color channel. Next, the program calculates a color range based on the Tolerance value — which can vary from 0 to 255. The program adds the Tolerance to the brightness value of the pixel you clicked to determine the top of the range and subtracts the Tolerance from the pixel's brightness value to determine the bottom of the range. For example, if the pixel's brightness value is 100 and the Tolerance value is 32, the top of the range is 132 and the bottom is 68.

Figure 6-2 shows the result of clicking the same pixel three separate times, each time using a different Tolerance value. It takes a dizzingly high Tolerance value of 160 to fill Morris County. And even then, I'll have to click several times to fill all of New York state. The moral is, don't get too hung up on getting the Tolerance exactly right — no matter how you paint it, the bucket is not a precise tool.


Figure 6-2: The results of applying the paint bucket tool to the same pixel on an antique map of New York after setting the Tolerance value to 32 (top), 100 (middle), and 160 (bottom). In each case, the foreground color was light gray.



Anti-aliased: Select this option to soften the effect of the paint bucket tool. As demonstrated in the left example of Figure 6-3, Photoshop creates a border of translucent color between the filled pixels and their unaffected neighbors. If you don't want to soften the transition, turn off the Anti-aliased check box. Photoshop then fills only those pixels that fall inside the Tolerance range, as demonstrated in the right example of the figure.


Figure 6-3: The results of turning on (left) and off (right) the Anti-aliased check box before using the paint bucket tool. Antialiasing is better for soft transitions, while turning the option off works best in high-contrast situations.



Contiguous: When you select this check box, Photoshop fills only contiguous pixels — that is, pixels that both fall inside the Tolerance range and touch another affected pixel. If you instead want to fill all pixels within the Tolerance range — regardless of where those pixels lie — deselect the check box. For what it's worth, I left the option on when creating Color Plate 6-1.



All Layers: Select this option to make the paint bucket see beyond the current layer. When the option is selected, the tool takes all visible layers into account when calculating the area to fill. Mind you, it fills only the active layer, but the way it fills an area is dictated by all layers.



Mode: This menu offers a selection of blend modes, which determine how and when color is applied. As demonstrated in Figure 6-4, the Normal mode can result in sharp transitions between fill color and outline. To create a smoother transition, try choosing the Multiply mode instead (as in the second example). Figure 6-4 also shows the Clear mode, which deletes pixels in a layer to create a hole, useful for deleting backgrounds. (Note that Clear is dimmed when working on a flat image or a Background layer.)


Figure 6-4: The results of selecting three of the many Mode options available when using the paint bucket. Notice that Multiply results in the smoothest edge transitions (middle) while Clear creates a hole in a layer (right).





Cross-Reference

For a thorough rundown of blend modes, see Chapter 13.




Opacity: This option works just like when you paint with the brush tool. Enter a new value or press a number key to change the translucency of a color applied with the paint bucket. (Press 0 for full opacity, 9 for 90 percent opacity, and so on.)



I feel the need at this point to expound a bit more on the All Layers option. For an example of how this feature works, look no further than Figure 6-5. The first image shows a flat version of the map with no fill colors. I could have set right in filling the state and seas, but then I would have made permanent changes to the map that might have been difficult to edit later. So instead, I created independent layers for each state — New York, New Jersey, and Connecticut — and a fourth for the water. To fill each layer, I turned on the All Layers check box and then used the paint bucket as normal. This way, Photoshop respected the outlines of the background map when coloring the various layers.


Figure 6-5: To avoid harming this antique map from the Corbis image library (top), I turned on the All Layers option and applied my fill colors to independent layers (bottom). This permitted me to fill an area of the map even though another layer was active.

For a color version of this same project, see Color Plate 6-1. The middle image in the color plate shows all the points at which I clicked with the paint bucket to fill the map. But even after all that work, I still had to paint in a few gaps with the brush tool. Note that in the cases of Color Plate 6-1, I set the Mode option for the paint bucket tool to Normal, and then I set the blend mode for each layer to Multiply.





Tip

To limit the area affected by the paint bucket, select a portion of the image before using the tool. As when using a paint or edit tool, the region outside the selection outline is protected from the paint bucket. To see an interesting application of this, skip ahead to the "Using the paint bucket inside a selection" section later in this chapter.


When working on a layer, you can protect pixels by locking the layer's transparency in the Layers palette. Like all layering issues, I cover the locking options in Chapter 12.





Tip

Here's one more paint bucket tip for good measure: You can use the paint bucket to color the empty window area around your image. First, make your image window larger than your image, so you can see some gray canvas area around the image. Now Shift-click with the paint bucket to fill the canvas area with the foreground color. This technique can come in handy if you're creating a presentation or you simply don't care for the default shade of gray.



The Fill command


The one problem with the paint bucket tool is its lack of precision. Although the tool is undeniably convenient, the effects of the Tolerance value are so difficult to predict that you typically have to click with the tool, choose Edit Undo when you don't like the result, adjust the Tolerance value, and reclick several times more before you fill the image as desired. For my part, I rarely use the paint bucket for any purpose other than filling same-colored areas. On my machine, the Tolerance option is nearly always set to 0, and Anti-aliased is generally off, which puts me right back in the all-the-subtlety-of-dumping-paint-out-of-a-bucket camp.

A better option is to choose Edit Fill or press Shift+Backspace (Shift-Delete on the Mac). (If you prefer function keys, try Shift+F5.) In this way, you can define the exact area of the image you want to color using the entire range of Photoshop's selection tools. For example, instead of putting your faith in the paint bucket tool's Anti-aliased option, you can draw a selection outline that features hard edges in one area, antialiased edges elsewhere, and downright blurry edges in between.

If you want to fill an entire layer, you don't need to create a selection outline before choosing Fill. The program assumes that you want to fill the whole layer if it doesn't see a selection outline. (Dynamic fills and layer styles provide additional ways to fill a layer; see Chapter 14 for details on how these fills differ from those you create with the Fill command.)

Selection outline or no, choosing the Fill command displays the dialog box shown in Figure 6-6. In this dialog box, you can apply a translucent color or pattern by entering a value in the Opacity option box. You can also choose a brush mode from the Mode pop-up menu. In addition to its inherent precision, the Fill command provides all the functionality of the paint bucket tool — and then some.


Figure 6-6: The Fill dialog box combines the opacity and brush mode options available for the paint bucket with an expanded collection of fill content options.

If you display the Use pop-up menu, you see a collection of fills that you can apply. Foreground Color and Pattern behave the same as they do for the paint bucket tool. When you select Pattern, the Custom Pattern option becomes available, as shown in Figure 6-6. Click the icon to display the Pattern drop-down palette, which also works just as described in the preceding section. Click an icon to select a pattern; click the right-pointing arrow to display the palette menu and load a different pattern preset.





Cross-Reference

To find out how to load, save, edit, and create custom pattern presets, see "Saving and loading brush sets" in Chapter 5. You use the same techniques for brush presets and pattern presets.


You can also fill a selection with the background color and such monochrome options as Black, White, and 50% Gray. Black and White are useful if the foreground and background colors have been changed from their defaults; 50% Gray fills the selection with the absolute medium color without having to mess around with the Color palette. History enables you to revert the selected area to a previous appearance, as I discuss at length in Chapter 7.

The Preserve Transparency option gives you the same result as locking the active layer's transparency in the Layers palette, which you can read about in Chapter 12. If you select Preserve Transparency, you can't fill transparent pixels in the active layer. Turn Preserve Transparency off, and you can fill the selection outline uniformly. (The option is dimmed when you're working on the background layer or if you already locked the layer's transparency in the Layers palette.)


Backspace- and Delete-key techniques


Of all the fill techniques, the Backspace key (Delete key on the Mac) is by far the most convenient and, in most respects, every bit as capable as the others. The key's only failing is that it can neither fill a selection with a repeating pattern nor revert a selection to a previous state. But with the exception of those two items, you can rely on the Backspace (Win) or Delete (Mac) key for the overwhelming majority of your fill needs.

Here's how to get a ton of functionality out of Backspace (Win) or Delete (Mac):



Background color, method 1: To fill a selection on the background layer with solid background color, press Backspace (Win) or Delete (Mac). The selection outline remains intact.



CautionBackground color, method 2: The problem with pressing Backspace (Delete on the Mac) is that it's unreliable. If the selection is floating, as I explain in Chapter 8, the Backspace (Win) or Delete (Mac) key deletes it. The key also erases pixels on a layer. So there's no time like the present to get into a new habit — press Ctrl+Backspace (z -Delete on the Mac) instead. Ctrl+Backspace (Win) or z -Delete (Mac) fills the selection with the background color, no matter where the selection is.



Foreground color: To fill a selection or a layer with solid foreground color, press Alt+Backspace (Win) or Option-Delete (Mac). This works when filling floating and nonfloating selections alike.



Black or white: To fill an area with black, press D to get the default foreground and background colors and then press Alt+Backspace (Option-Delete on the Mac). To fill an area with white, press D for the defaults and then Ctrl+Backspace (z -Delete on the Mac).



Preserve transparency: Add the Shift key and you get two more key tricks that make more sense when you read Chapter 12. (Don't worry, I'll repeat the tricks then.) You can fill only the opaque pixels in a layer — regardless of whether you locked the layer's transparency in the Layers palette — by pressing Shift. Press Shift+Alt+Backspace (Shift-Option-Delete on the Mac) to fill a selection with the foreground color while preserving transparency. Press Ctrl+Shift+Backspace (z -Shift-Delete on the Mac) to fill the opaque pixels with the background color.




Using the paint bucket inside a selection


So far, I've come up with two astounding generalizations: The paint bucket tool is mostly useless, and you can fill anything with the Backspace key (or Delete key on the Mac). Well, just to prove you shouldn't believe everything I say — some might even suggest you dismiss everything I say — the following steps explain an effect you can create only with the paint bucket tool. Doubtless, it's the only such example you'll ever discover using Photoshop — after all, the paint bucket is mostly useless and you can fill anything with the Backspace (Win) or Delete (Mac) key — but I'm man enough to eat my rules this once.

The following steps explain how to create an antique photographic frame effect, such as the one shown in Figure 6-7.


Figure 6-7: I created this antique frame effect by filling a feathered selection with the paint bucket tool.

STEPS: Creating an Antique Framing Effect




Use the rectangular marquee tool to select the portion of the image you want to frame. Make certain the image extends at least 20 pixels outside the boundaries of the selection outline, and be sure to use a photo — this effect won't look right against a plain white background.



Choose Select Feather. Or press Ctrl+Alt+D (z -Option-D on the Mac). Then specify a Radius value somewhere in the neighborhood of 6 to 12 pixels. I've found these values work for nearly any resolution of image. (If you enter too high a value, the color you'll add in a moment with the paint bucket will run out into the image.)



Choose Select Inverse. Or press Ctrl+Shift+I (z -Shift-I on the Mac). This exchanges the selected and deselected portions of the image.



Press D to make certain the background color is white. Then press Ctrl+Backspace (z -Delete on the Mac) to fill the selected area with the background color.



Select the paint bucket tool. If the Options bar isn't visible, press Enter or Return to display it. Make sure the Fill option is set to Foreground. Then enter 20 or 30 in the Tolerance option box and turn on the Anti-aliased check box. (You can also experiment with turning off this last option.)



Click inside the feathered selection to fill it with black. The result is an image fading into white and then into black, like the edges of a worn slide or photograph, as shown in Figure 6-7.



Figure 6-8 shows a variation on this effect that you can produce using the Dissolve brush mode. Rather than setting the Tolerance value to 20, raise it to around 60. Then select the Dissolve option from the Mode pop-up menu in the Options bar. When you click inside the feathered selection with the paint bucket tool, you create a frame of random pixels, as illustrated in the figure.


Figure 6-8: Select Dissolve from the Mode pop-up menu in the Options bar to achieve a speckled frame effect.

/ 143