Gradients are a great way to create visual interest in your designs. But what the heck is a gradient anyway? The way I've come to describe them is, a transition between two or more colors. In other words, we'll be blending at least two colors together; and in this tutorial, we'll be setting up a background gradient for our website's header area.
What size and resolution should you make your Photoshop file? Since we'll be creating a gradient for our website, we can keep everything low resolution (72ppi). As for the dimensions, that would be determined by our website's layout. Let's assume for this exercise that our website's header area is 960 pixels by 100 pixels.
But don't forget, gradients can also be used in print. In that situation, you'd just figure out how large an area of your print document you want to fill, and set your document size accordingly. Of course, you'd also be using a much higher resolution (more like 300ppi).
Okay, let's get started on creating our web gradient.
Go ahead and create a new blank document in Photoshop.
Using our example of a gradient for a website's header, make sure to set your width and height accordingly (again, 960x100 pixels). Also, set the resolution to 72 pixels per inch and the color mode to RGB. Hit OK when you're ready.
From the Toolbox, grab the Gradient tool.
You could change your foreground and background colors by clicking on their color swatches in the Toolbox, but let's take a look at Photoshop's library of preset gradients.
On the Options bar, click the drop-down arrow beside the gradient swatch.
If you opt for one of Photoshop's additional gradient libraries, you'll be asked whether you want to replace the current gradients with the new library. Click OK to replace them, or Append to add them into the current library.
Once you've chosen a gradient, you're ready to apply it to your file.
To apply your gradient, click and drag inside the document window.
For example, click and drag from the left side of your document to the right; or from the top to the bottom. You can even drag on an angle if you wish. If you'd like your gradient to be perfectly straight either horizontally or vertically, hold down Shift as you drag.
Choose File > Save As; then name your file and choose JPEG from the Format menu.
Here's what our final gradient looks like:
In a future tutorial, we'll talk about using Photoshop's Save For Web & Devices dialog box, which allows us to have much tighter control over how our images are saved out for use in web design.
From here, you'd then load your new gradient into the header in your web layout; perhaps by inserting it directly into the header, or setting it as a background graphic via CSS. As you can see, working with gradients in Photoshop is fun and easy. In yet another future tutorial, it would be fun to take a look at how to create, save, and work with custom gradients!