All 127 tools

CSS Gradient Generator

Build linear and radial CSS gradients with up to three colour stops and an angle control. Live preview and copy-ready CSS.

Live preview. Copy the code when it looks right.

135°
Code
background: #2346d8;
background: linear-gradient(135deg, #2346d8 0%, #f5b000 100%);

About this tool

Pick colours and an angle and copy the CSS. Gradients drawn by CSS are sharp at any size and cost nothing to download.

Designing gradients that look polished

Gradients add depth and energy to buttons, banners, hero sections and backgrounds. Because they are drawn by CSS rather than loaded as images, they stay perfectly sharp on any screen, scale to any size and add almost nothing to page weight. This generator lets you pick colours, choose a linear or radial style and set the angle, with a live preview and CSS you can copy straight into your stylesheet.

The most attractive gradients usually use colours that sit fairly close together on the colour wheel, such as blue to violet or orange to pink. Very different colours, like red to green, often create a muddy band in the middle where they blend. Adding a middle colour gives you more control over that transition and can make the effect feel richer. Linear gradients suit backgrounds and buttons, while radial gradients work well for soft spotlights and glows behind content.

Think about readability whenever text sits on top of a gradient. Check contrast at both the lightest and darkest ends, since text that is readable on one side may disappear on the other. A darker overlay or a solid panel behind the text can help. Use gradients with restraint: one strong gradient in a hero section usually looks more intentional than many competing ones across the page. Modern browsers support CSS gradients without vendor prefixes, so the code works as it is. Try a few angles before deciding, because a small change from 90 to 135 degrees can make a layout feel noticeably more dynamic. Save colour values you like so your gradients stay consistent across the site.

How to use it

  1. Adjust the settings.
  2. Check the live preview.
  3. Copy the generated code into your page or stylesheet.

Questions

Do CSS gradients need vendor prefixes?

No. All current browsers support the unprefixed linear-gradient() and radial-gradient().

How do I put text over a gradient?

Use it as the element's background and check the text contrast against both ends of the gradient.

Last reviewed 16 October 2026.