Bjango home
Articles
Help
Contact
iStat Menus
iStat for iOS
Consume for iOS
Skala
Skala Preview
iStat Server
for Mac
See all apps

Gradients

Gradients are a great way to add lifelike lighting and shading to surfaces. When built with gradient layers and layer styles, they also ensure UI elements can be scaled and reused easily.

Linear gradients

Linear gradients are gradients in their most basic form—a gradual blend between colors, following a straight line. I’m sure you knew that, so onto the more interesting stuff.

Reflected gradients

Reflected gradients are like their linear friends, but they repeat the gradient twice with the second repeat mirrored. This makes editing a little less tedious, provided it fits the result you’re trying to achieve.

Radial gradients

Radial gradients start from the center (or any chosen point) and grow outward in a circular pattern. They’re handy for creating spheres and applying effects to the edge of circular elements. The center point for the gradient can be moved by clicking and dragging on the canvas while the gradient window or layer styles window is open.

Angle gradients

Angle gradients can be a great way to mimic environmental reflections found on highly polished metallic objects. The center point for the gradient can be moved by clicking and dragging on the canvas while the gradient window or layer styles window is open.

Gradients on gradients

Anything worth doing is worth overdoing, right? Combining a gradient layer with a gradient layer style lets you overlay two different gradients, giving more complex and—here’s the good part—completely dynamic results. To combined the gradients, you’ll need to set a blending mode for the gradient layer style. For the examples below, I’ve used either screen (good for lightening) or multiply (good for darkening).

Dithering is everything

Adding dithering to a gradient produces smoother results. Non-dithered gradients can often contain visible banding. Dithering is even more important if your artwork is being viewed on cheaper 6-bit per channel TN LCDs and certain display types, which tend to amplify posterisation problems.

If you’re not seeing the difference, here’s an extreme, completely unrealistic example of gradient dithering in action.

Ensuring your gradients are dithered is easy—just check the appropriate box in Photoshop.

Note that gradient layer styles can’t be dithered in Photoshop CS5 and earlier (Photoshop CS6 added the ability). and gradients in placed objects (like stuff you’ve pasted from Illustrator) aren’t dithered.

If you use transparency in a gradient, that won’t be dithered either, which can be a huge issue at times. There is a solution for some specific cases—if you’re using a gradient with transparency to lighten an area with white, then using a non-transparent gradient with a screen layer blending mode will let you dither it. The same technique can be used for darkening with the multiply blending mode.

The techniques described above were used to create the new iStat Menus icon.

Gradient Maps

Quite different to other types of gradients, gradient maps can be a great way to add colour treatment, allowing for very precise control. Gradient maps use the brightness of each pixel to map to a corresponding colour in a gradient.

If the gradient starts at red and ends at blue, then everything that’s white in the image will be turned red and everything black will be turned blue. Everything in the middle tonally will map to the gradient, depending on how bright it is.

The image below was used in a poster for Kingswim, a swimming school.

Without the gradient map, things look quite different. It’s a composite of about seven photos—the boy and background were shot on black & white film, intentionally low contrast so the grain would be more prominent when the contrast was pushed by the gradient map. The gradient map also hides the colour mismatches in the compositing.

Obsessed?

Yes, I’m obsessed with gradients. I’m also obsessed with rounded rectangles, textures and setting up Photoshop so colours don’t shift when you save for web.

Other articles

My app design workflow
Gradient maps
Strokes in Photoshop CS6
Just like print design
Layer tags
Using algebra to create paths
Sub-pixel text rendering
Photoshop Actions & Workflows
Scale Patterns to 100% script
Text in Photoshop CS6
Masking in Photoshop CS6
Illustrator and app design
Vector shapes in Photoshop CS6
Photoshop CS6 improvements
Pixels per inch is just a tag
PNG compression and iOS apps
Everything is a grid
Smart Objects
Exporting from Photoshop
Iterate Podcast
Pixel perfect rotation
Pixel perfect vector pasting
Pixel perfect vector nudging
What if iChat was one window?
Gradients
Designing for Retina display
Designing for Retina display, part two
A new Drobo Dashboard icon
Noise and textures
Photoshop CS6 wish list
What to do with all those extra pixels?
Photoshop roundrect roundup
Colour management and UI design
How many layers are in my PSD?
Dissecting iTunes and App Store links

About the author

Marc Edwards is the Director & Lead Designer at Bjango. Follow @marcedwards on Twitter and @marc on App.net.

  • Bjango on Twitter
  • Bjango on Dribbble
  • Bjango on GitHub
  • Bjango on App.net
  • RSS Feeds
  • Marc on App.net

©2013 Bjango Pty Ltd. All rights reserved. ABN 88 062 334 580.
Apple, the Apple logo, iPad, iPhone, and iPod touch are trademarks of Apple Inc., registered in the U.S. and other countries. App Store is a service mark of Apple Inc.
If you've done things right, people won't be sure if you've done anything at all.