Interfaces and CSSRuns in your browser

CSS Gradient Generator

Configure a two-color CSS gradient, check the preview, and copy the declaration for your interface.

  • Linear and radial
  • HEX color stops
  • No remote assets
Online tool

Try the tool

Add your data, choose the settings, and get the result.

Input

Result

.gradient-surface {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

Processing in your browser

Text and selected files are processed in the current browser and are not sent to a server to produce the result.

Reviewed: 2026-07-17
01

How to use it

  1. 1

    Choose linear or radial mode.

  2. 2

    Enter two HEX colors and stop positions.

  3. 3

    Copy the generated CSS declaration after checking the preview.

02

What the tool can do

  • Linear gradient with a 0–360 degree angle.
  • Radial gradient circle at center for basic UI surfaces.
  • Validation for 3/6-digit HEX and 0–100% stop positions.
03

Common use cases

  • Quick background for a hero, card, or CTA.
  • Choosing a gradient token before moving it into a design system.
  • Checking angle and stop positions without hand-writing CSS.
04

How it works inside

The preview uses only validated HEX colors and numeric values.

The generator emits plain CSS and does not create images or JavaScript snippets.

05

Questions and answers

How do I create a gradient and use it on my site?

Choose two colours, a gradient type, and the available direction and position settings. Check the preview and copy the CSS value into the relevant element's styles.

Can I add a third colour?

This generator uses two colours. Edit the copied CSS yourself for a more complex transition and test it in a browser. The preview here shows only the selected colour pair.