May 12
Illustrator swatches gradient background effect
2009 at 12.34 pm posted by Veerle Pieters
The Adobe’s Creative Suite 4 packages have this interesting gradient style effect. It looks like a grid of swatches going from one color to another in subtle gradient effect. If you have ever wondered how you create this effect, then I invite you to take the jump and read on.

Create new document
Create a new document (File > New or hit Cmd/Ctrl + N) of 640 px by 140 px using pixels as Units and RGB as color mode (which can be found under the Advanced options).
Create first swatch
Select the Rectangle tool and click once on the canvas. In the Rectangle dialogue box enter a width and height of 20 px. Click OK. Give the square a color. I've used a dark purple.
Move first swatch into place
Make sure Smart Guides are enabled: View > Smart Guides or Cmd/Ctrl + U. Select the square (which will we will refer to as 'swatch' from now on) and move it into the top left corner of your document.

Duplicate swatch
Go to Object > Transform > Transform Each or hit Cmd/Ctrl + Option/Alt + Shift + D. We need to copy the swatch and move it 620 px towards the right, so it sits in the top right corner of our document. Enter the value of 620 px in the Horizontal option under Move. Click the Copy button to copy the original swatch.
Create gradient effect using the blend tool
Give the swatch a different color (no stroke). I've used a very bright red. Select the Blend tool from the toolbox. Click the bottom right point of the first swatch. Hold down the Option/Alt key and click in the bottom right point of the other swatch.

In the Blend Options box choose Specified Steps and enter 30 steps. Click OK.

To know this specific value is a matter of simple calculation. Our document is 640 pixels wide and we're using a square of 20 pixels. 640 divided into 20 gives us 32, minus the 2 squares that area already in place (first one and last one), gives us exactly 30. You should get a similar result like the image below.

Duplicate the blend
Select the blend by grabbing the top border of the first swatch using the Selection tool (black arrow). Click to start dragging the blend vertically down. Hold down the Option/Alt key (to duplicate the blend while dragging) as well the Shift key (making sure it's 100% vertical) while dragging. Release the mouse once you've reached the bottom border of the original blend as shown in the image above.

If all went well you should end up with 2 nicely adjoined rows of blends as shown in the image below.

Now hit Cmd/Ctrl + D 5 times in a row to duplicate this action 5 times. You should end up with a similar result as shown in the image below.

Adjust color swatches to your liking
Select the Direct Selection tool (white arrow) and select the first or last swatches of each row one by one and change the color slightly to create a subtle vertical gradient effect. In my example at the beginning of my article, I've gone from very dark purple towards brown for the first swatch and from red towards yellow-orange for the last swatch.
Try to only make very subtle change to each swatch, this way you'll end up with a nicely gradual change of colors instead of abrupt changes of colors.

Hope you've enjoyed this one ;)
Want to learn more?
A good and not expensive source to learn more about Illustrator, Photoshop, or web design is by joining the Tuts+ sites. You get access to the source files for just $9 a month. So your ONE membership gives you access to members-only content for ALL the Plus sites. I've written a tutorial for the Vector Tuts section.


25served
1
Now I wasn’t aware of that, I’ll be working on some Illustrator projects in my course next year so I’ll keep hold of this, thanks :)
2
Now that’s an awesome tutorial ! I’m thinking of using that in some of my projects. Thanks !
3
looks good, but wouldn’t it be a lot quicker to apply a mosaic effect to some gradient in photoshop? this would also give you a lot more control over the “big picture”. then again, it’s not vectors, but being just solid colored boxes they’re scalable nonetheless.
cheers,
—mark
4
Thx for this tip. I just did some fooling around and found that if you wanted to control the color blend, corner to corner, you can do something like so:
Say I have 4 rows and I want a blend from #ffffff in the top left to #111111 in the bottom right. I put those colors in their positions. Now I have 6 spots in between so I just need to divide the colors equally and apply them going down the first column, then the second. For this example each step is 2 positions in hex.
#ffffff > #7777777
#dddddd > #555555
#bbbbbb > #333333
#999999 > #111111
5
Well, I tried that last week, came up with the same method,... but I kept wondering…
There schould be a better way.
I tried blending blends, but that’s something adobe still got to invent.
6
Thanks for another great tutorial, Veerle. I don’t mean to be rude, but I think I have a an easier route for getting a similar effect. If you make a gradient image (using any direction or combination of colors) in Photoshop then run a Mosaic Pixelate Filter on it with a large cell size you get the same look. Since this filter creates a grid of solid colors, you can then save the image, open it up in Illustrator and run a Live Trace (with mode set to color, increased max colors & 0 blur) to create a scalable vector version.
7
Great ... like always =)!
8
mark said:
I tried out this technique and it seems it gives you a slightly different result as it applies a gradient within each square instead of a solid color for each square, which is not what I was after. I’m not sure I agree on the total control either because I still have my blends I can edit for each row. If you look at the Adobe Creative Suite 4 Design Premium for example, it’s not a straight gradient, they’ve played with it row by row. This is something you can do with my method. The difference is in the details ;)
Jason Beaird said:
I appreciate you sharing your method, but again I prefer my method still because of the reasons mentioned above. The result is different: gradient within each square/cell which is less nice in my opinion. The blend keeps this flexible as well to change colors, more controllable in my opinion. The Mosaic Filter is maybe the ‘fast’ way, but if details count then I think you’re better off with this Illustrator technique. That’s just my opinion of course :) I’m just a bit disappointed in the result once you add the filter on it. It’s just not the same. Could be nice for something else though.
9
I was playing off of your tutorial as well. I have always used the mosaic filter in PhotoShop as well for a similar effect, but I did like the different look you could get using this method. I also liked using this same method with different shapes other than squares. Hexagons made for a very cool look.
10
Veerle Pieters said:
I agree with Jason Beaird. I’ve used the tracing method for creating this effect in Illustrator and I got nice solid squares, no gradients. The Mosaic fiilter in Photoshop creates solid blocks of colour.
11
Rather than adjusting the color in each of the duplicated blends, try this:
1. Copy and move the first blend to the bottom of your artwork.
2. Set new beginning and ending colors of the copied blend, using the direct selection tool.
3. Select both blends and expand them (Object > Blend > Expand).
4. With the object still selected, create make new blends (Object > Blend > Make).
5. Set the number of steps appropriately.
12
Tudor said:
Because you mention you end up with solid colors I did another test. This is pretty weird, I believe my eyes are tricked. I really see them as squares filled with gradients, but once I measure the color with the Color picker I see they are not. Feels a bit like optical illusion. So you are right they aren’t gradients. The effect still feels different. Maybe it’s because I tried it out with a diagonal gradient.
@Jason Beaird and @Mark: My apologies for the mis information regarding the gradient in the squares. My eyes are just tricked:
I still prefer to have manual control over each row though via the blend so you can change the gradient gradually the way you want. This shows again that everybody have their way of doing things :) It’s nice to share this kind of info.
Gary said:
Haven’t tried this out, but it sure sounds like a cool technique. Takes it one step further than mine. Pretty interesting. Thanks for sharing this :)
13
This effect should useful for creating boxy gradients on business cards - avoiding the potential banding issue with low quality printers. And thats exactly what I’m going to do…
Thanks again!
14
The Vector tutorial is great if you need total control. I prefer Marks (3rd comment) Photoshop way and experimenting with some textures or photographs like i did on my own site.
By the way, i think this is becoming a trend in design…
Greetings Edgar
Thanks Veerle!
15
Nice tutorial. I’ll be checking vector tuts for your tutorials there!
16
Simple and stylish, that´s the way to go. Thanks for sharing!
17
Many thanks for the tutorial. It’s a nice effect and something I might call upon in a project that’s coming up.
18
Wow, this is an amazing tut! You never cease to blow me away with your tutorials, Veerle! :)
19
Hi, Veerle!
I definitely enjoyed this tut and came up with a great result:)
I think i found a way to improve this technique. Instead of manually adjusting colors you can do it like I’ve shown in the picture:
20
This is the easiest and most simple tutorial yet! Thanks so much.
21
Great tut!
Nice in order to reproduce the CS4-like graphics, but also to create custom designs!
22
I was just going to suggest something simlar to what irinei said; I use a similar method at work to generate fields of swatches for matching a given color on our printers. For an interesting square-halftone effect, try scaling down one or two of the squares before expanding and re-blending.
This was done as described plus a distortion envelope.
That being said, I love your blog and tutorials Veerle. I’ve been following a long time, this just happens to be the post that brought me out of lurking status.
23
Wow that is really useful, I never really managed to make a perfect gradient like that, I always was stuck in Illustrator. Thanks Veerle.
24
Ryan Malm said:
“This was done as described plus a distortion envelope.”
Exactly what envelope distortion did you use? Can you give specifics?
25
Kyle: I used warp>flag, horizontal, 7% bend, 11% and 8% for H&V distortion, respectively.