Applying Fills and StrokesAs we mentioned earlier in this chapter, vector shapes comprise anchor points, which control how the paths that connect them are drawn. The anchor points and direction handles make up the physical structure of a vector object, which is further made up of two attributes: a fill and a stroke. The fill of a vector object is the appearance of the area that is enclosed by its path. If the shape isn't a closed path, the fill is defined by the existing path and is closed with a straight line connecting the start and end points (Figure 2.13 ). The stroke of an object is the appearance of the vector path itself. These paths are referred to as Bézier curves and, because of their nature, they result in objects or shapes that have clean smooth edges. Figure 2.13. Open paths can have a fill attribute applied, and Illustrator stops the fill by creating a boundary (no physical path is created).![]()
FillsThere are three different types of fill attributes: solid colors, gradients, and patterns (Figure 2.14 ). Each of these fill types is stored in the Swatches palette. The buttons along the bottom of the Swatches palette determine if the palette displays all kinds of swatches, or just solid color, gradient, or pattern swatches individually. You can also use the Swatches palette menu to have the swatches listed by name or with larger thumbnails. Figure 2.14. Three objects, are shown each containing a different kind of fill: solid color, gradient, and pattern.![]() Figure 2.15. When applying attributes from the Control palette, you don't have to target the fill or stroke of an object first. Instead, you can choose directly from the two separate pop-ups.![]() |
Figure 2.16. The fill and stroke indicators in the Toolbox allow you to specify whether you want to apply an attribute to the fill or stroke of a selected object. Double-clicking the indicators opens the Color Picker.

![]() | When you're using the sliders to specify colors in the Color palette, hold the Shift key while you drag one slider to get lighter or darker shades of your color. |
Solid Fills
A solid color fill applies a single color to the appearance of the fill of a vector shape. Ordinarily that would be a simple concept, but Illustrator can actually create three different kinds of solid colors. Each of them serves specific purposes and it's important to understand when each should be used.
![]() | Because it's easy to forget whether the fill or stroke is in focus, it's recommended that you always keep the focus on the fill, and if you need to toggle to the stroke, try toggling back to fill immediately when you're done. Otherwise, there are just too many times where you click a color to fill an object and nothing happens to the fill. This occurs when the focus is on the stroke and the color is applied to the stroke in error. |
Figure 2.17. Double-clicking an existing solid color swatch opens the Swatch Options dialog where you can specify the values for a color and create a global swatch.

Figure 2.18. Swatches with white triangles are global process colors. Swatches with black dots in addition to the triangles are spot colors.

![]() | Global process colors act much like spot colors in that you can specify tint values for a global color (Figure 2.19 ). Regular process colors cannot have tint values assigned. |
Figure 2.19. You can use the Color palette to specify a tint value of a global process colorsomething that is not possible with a process color.

Gradient Fills
Although a solid color fill is made up of just one color, a gradient fill is made up of solid colors that blend into each other. A gradient can contain as few as one color and as many aswell let's just say we stopped counting at 300. Linear gradients start with a color on one side that gradually blends into a color on the other side. Radial gradients start with a color at the center and gradually blend into a color, radiating outward (Figure 2.20 ). A gradient has four attributes:Type. Either linear or radial, as just described.Color Stop. The point at which a new color is added to a gradient.Midpoint. The point at which two adjacent colors meet at exactly 50 percent of each color.Angle. The direction of the gradient (only for linear gradients).
Figure 2.20. You can use linear and radial gradients to easily add shading or perceived dimension to objects.

Figure 2.21. Moving a color stop shifts where color appears in the gradient. Dragging one color stop on top of another while holding the Option (Alt) key swaps the colors.

![]() | To replace an existing gradient, hold the Option (Alt) key while you drag the preview icon from the Gradient palette over the existing gradient swatch in the Swatches palette. The swatch appears with a thick black outline to indicate that it will be replaced with the new one. |
Figure 2.22. The Gradient tool makes it easy to apply gradients at an angle.

Figure 2.23. A gradient fills the distance from where you first clicked to where you release the mouse, even if those locations are beyond the boundaries of your selection.

Pattern Fills
A pattern fill uses a repeating art element to fill the boundaries of a path or object (Figure 2.24 ). To define a pattern, create just about any kind of art on your artboard (including raster images and text objects) and drag them into your Swatches palette. You can apply pattern fills to objects the same way you apply solid color fillsby targeting the fill or stroke of a selection and choosing a pattern swatch from the Swatches palette.
Figure 2.24. Three examples of vector objects with pattern fills. Good patterns have no visible seams.

The Art of Pattern MakingIn reality, an entire book could be written on creating patterns, which is an art form in and of itself. Creating perfect, repeating patterns that tile seamlessly can take a bit of advance planning, as well as trial and error.When you drag artwork into the Swatches palette to create a pattern swatch, Illustrator uses the bounding area of the artwork that you selected as the boundary of the repeat area. In many cases however, this default bounding box does not create a seamless pattern. In order to create a seamless pattern, you may have to position objects well inside the repeat area, or even have artwork extend beyond the repeat area. To define a repeat area for a pattern, draw a rectangle and send the rectangle to the bottom of the stacking order. Even if there are objects that extend outside the rectangle, Illustrator will use that rectangle to define the repeat area (Figure 2.25 ). Figure 2.25. Creating a rectangle as the bottom-most shape in your pattern art defines a repeat area, thus helping to create a seamless pattern.![]() |
Strokes
As you learned earlier, a stroke is the appearance of the vector path itself. You can specify a stroke color by choosing one from the Stroke pop-up in the Control palette or by targeting the stroke using the fill/stroke indicator and then choosing a color from either the Color or Swatches palette. You can choose between several different settings to control the appearance of a stroke, all of which are available in the Stroke palette:Weight. The thickness of a stroke is referred to as the stroke weight , and it is traditionally specified in points (pt). Specifying a stroke weight of less than .25 pt might be problematic for most printing presses.Miter limit. A stroke's miter limit specifies the appearance of corners that have very acute angles. If you find that the corner of a stroke appears clipped, you can increase the miter limit to correct the appearance (Figure 2.26 ).
Figure 2.26. The object on the left has an 18-point stroke applied with a miter limit of 2, whereas the object on the right has an 18-point stroke applied with a miter limit of 4.

Figure 2.27. The cap setting defines how the start and end of a stroke appears. From the top, Butt, Round, and Projecting caps can also add to the length of a stroke.

Figure 2.28. The join setting defines the appearance of connecting straight anchor points. From left to right are examples of stroked paths with Miter, Round, and Beveled joins.

Aligning Strokes
By default, Illustrator paints a stroke on the center of a path. For example, if you specify a 10-point stroke for an object, the result is 5 points appearing on the outside of the path and 5 points appearing on the inside of the path. In the Stroke palette, you can specify whether you want the entire stroke painted on the inside or the outside of the vector path (Figure 2.29 ).
Figure 2.29. Use the Align Stroke options in the Stroke palette to specify if a stroke should be painted on the center, inside, or outside of the path.

Dashed Strokes
Strokes don't have to be solid lines. They can have a broken appearance resulting in dashed lines. The nice thing is, rather than just choose a preset dashed line, you can specify exactly how the dashes should appear along a stroked path.When specifying the appearance of a dash, you can specify the length of the dash, and the length of the gapthe space that appears after the dash. The Stroke palette contains three sets of dash and gap settings. If you specify a dash without specifying a gap, Illustrator creates a gap equal to the size of the dash. For most standard dashed strokes, you will only use the first dash and gap setting. However, you can use all three to create a sequence of dashes and gaps (Figure 2.30 ). When you specify the Round cap option for the stroke, a dash value of 0 results in a perfect circle, allowing you to create dotted lines.
Figure 2.30. Illustrator's ability to set custom dashes on a stroke allows you to create a plethora of dashed strokes, which you can use for a variety of tasks.

Figure 2.31. Because Illustrator uses absolute values for dashes, it's nearly impossible to get dashes to line up perfectly at the corners of a path.

![]() | If adjusting dashes along a path is something you need to do often, you might want to check out a shareware ($15) plugin created by Rick Johnson called Nudge Palette. You can find Nudge Palette at http://rj-graffix.com. This plug-in allows you to easily shift dashes along a path to get the most optimal appearance. |