How to Make a Gradient Background

Gradient types, how to pick colors, and what to watch for when you put text on top.

6 min read · Updated 2026-10-28

A gradient (colors that change gradually) adds depth and mood more easily than a solid background. You can use one right away as a thumbnail, card or banner background, even without a photo.

Types of gradients

TypeWhat it doesWorks well for
LinearColors change in one directionBanners, card backgrounds
RadialSpreads out from the centerBackgrounds that highlight a focal point
DiagonalA linear gradient at an angleWhen you want a dynamic feel

Picking two colors

Two very different colors make the transition look distinct, while two shades of the same family (for example two blues) blend smoothly. To take colors from a photo, extract two main colors with the Color Palette Generator and put them into the Gradient Generator.

Step by step

  1. Open the Gradient Generator.
  2. Pick a start color and an end color, or use HEX codes you extracted from a photo. If you need more, "+ Add color" lets you use up to five.
  3. Choose the type (linear, radial or conic) and the angle.
  4. The PNG is saved at 1920×1080 (16:9). If you need another size, such as a 1280×720 thumbnail or a 1080×1350 post, resize the saved image with the Image Resizer.
  5. Save it as an image or copy the ready-to-use CSS code.

Which gradient suits which mood?

Blue linear gradients are often used for a cool, trustworthy mood, while orange and yellow suit a lively, warm feel. For a premium look, gradients from black to deep purple or navy are popular. The mood-based color table in our color scheme guide works for choosing the two gradient colors too.

Gradient vs. solid vs. photo backgrounds

Solid backgrounds are clean but can look plain, and photo backgrounds are rich in mood but text easily gets lost. Gradients sit in between: they add depth without a photo, and it's fairly easy to predict where text will sit. They are especially useful for content where photos are hard to find (informational posts, notices and so on).

Putting text on a gradient

Gradients are often light on one side and dark on the other, so a single text color may not read well on both. It's safer to add an outline or shadow to the text, or to choose colors whose brightness barely changes where the text will go.

What angle works best?

There is no single answer, but many people find 135 degrees (top left to bottom right) natural and balanced. A slight tilt adds more energy than a straight vertical gradient (0 degrees in CSS, bottom to top) or a straight horizontal one (90 degrees, left to right). Try a few angles and keep the one that fits your design best.

Good vs. bad examples

Common mistakes

Checklist

FAQ

Can I layer a photo with a gradient?

Yes. Placing a semi-transparent gradient over a photo lets you adjust its brightness and add mood.

How do I use the CSS code?

Paste the copied code into your website's background style and the same gradient is applied. No coding knowledge is needed; just copy and paste.

How many colors can a gradient have?

The tool lets you use from two up to five colors. Press "+ Add color" and adjust the position (%) of each color. Starting with two is the cleanest way to begin.

Do I need to think about fonts on a gradient background?

Yes. Because the brightness changes across the background, a bold font with an outline usually reads more reliably than a thin font. Check the darkest and lightest spots behind the text.

Try it now