Design ToolsA little help for every day

Search by name or task, such as JSON or percentage.

Design Tools

CSS Gradient Generator

Build linear, radial or conic CSS gradients with a live preview. Set the angle, opacity at each end and an optional middle colour, or output gradient text CSS.

View all tools
ResultUpdates as you type
background: linear-gradient(135deg, #1a73e8 0%, #0f9d58 100%);

How to use CSS Gradient Generator

Choose a gradient type, pick the start and end colours and adjust the angle or centre. Add a middle colour if you need three stops, choose background or gradient text, then copy the CSS shown under the preview.

  1. Pick the type and coloursChoose linear, radial or conic and set the start and end colours with the colour pickers.
  2. Fine-tune the gradientSet the angle, start and end opacity, an optional middle colour and its position, or the radial shape and centre.
  3. Copy the CSSChoose Element background or Gradient text and copy the declarations shown under the preview.

Angles, gradient types and colour stops

Linear angles run clockwise from the top: 0deg points up, 90deg right and 180deg down, so the default 135deg runs from the top left to the bottom right and gives linear-gradient(135deg, #1a73e8 0%, #0f9d58 100%). Radial output starts as radial-gradient(circle at center, …) and can switch to an ellipse or move its centre to an edge or corner. Conic gradients sweep around a point, for example conic-gradient(from 135deg at top left, …). A middle colour adds a third stop at the position you choose, 50% by default, and an empty angle box falls back to 180deg.

Fades to transparent and gradient text

Set the end opacity to 0 and the last stop is written as rgba(15, 157, 88, 0), the same green with no opacity, which is handy for fading an image into the page; the checkerboard in the preview shows the see-through part. Opacity values must be between 0 and 100. Choosing Gradient text adds -webkit-background-clip: text, background-clip: text and color: transparent, so the letters are filled with the gradient. Keep the text large and bold enough to read, and check contrast at the lightest end of the gradient.

Accuracy and data handling

Review colours, dimensions and visual settings in the real component, type size and target display. The calculation runs in your current browser; the tool code does not send the input to a processing API.

FAQ

How do I change the gradient direction?

Enter any angle in degrees: 0 points up, 90 right, 180 down and 270 left, and negative values work too. Conic gradients use the same angle as their starting point. The preview updates as you type.

Can I put a gradient on text?

Yes. Set Apply to Gradient text and the CSS includes background-clip: text, the -webkit- prefixed version and color: transparent, so the gradient shows through the letters.

Why doesn't my gradient show up?

Gradients are background images, so set them with background or background-image, not background-color. The element also needs a size or some content, otherwise there is nothing to paint.

More Design Tools

Related tools