Skip to content

CSS gradient generator

Set the type, angle and colour stops, preview the result at full size and copy CSS that works in every browser.

Runs in your browser. Everything happens in your browser. Nothing you enter is sent to NismaCloud.

Type
Blend in

OKLCH avoids the grey middle between distant colours. Supported in current browsers; the sRGB line is the fallback.

Colour stops
gradient.css
.gradient {
  background: linear-gradient(135deg, #0b1f3a 0%, #2563eb 100%);
  background: linear-gradient(135deg in oklch, #0b1f3a 0%, #2563eb 100%);
}

How to use it

  1. 1

    Start from a preset or set your own colour stops.

  2. 2

    Choose linear, radial or conic and adjust the angle or shape.

  3. 3

    Blend in OKLCH for smoother transitions between distant colours.

  4. 4

    Copy the CSS; it includes an sRGB line for older browsers.

Why OKLCH blending looks better

Classic sRGB gradients pass through a dull grey middle when the end colours are far apart, for example blue to orange. Interpolating in OKLCH keeps the middle saturated. Browsers that do not support it use the sRGB line just above it.

Questions

Will the gradient slow my site?

No. CSS gradients are drawn by the browser and add no image download.

Can I put text on a gradient?

Yes, but check contrast at both ends with the contrast checker.

What is a conic gradient for?

Colour wheels, pie-chart style fills and angular light effects.

Updated:

Use your palette on a real site

Every NismaCloud template takes your brand colours and fonts, and checks text contrast as you design.