Start a project

Tool 62 of 244 · CSS

Shadow & Gradient Builder

Build soft, layered shadows and smooth gradients visually, see them live, and copy clean CSS. No more guessing four numbers and a colour.

Shadow & Gradient Builder at a glanceIllustration: 1, Colours and layers; 2, processed in your browser; 3, Shadow + gradient CSS.Shadow & Gradient BuilderAa 4.5:11Colours and layers3Shadow + gradient CSS2In yourbrowser
1 Colours and layers 2 processed on your device 3 Shadow + gradient CSS

Shadow & Gradient Builder

Preview

Card
CSS

Shadow layers

Several soft layers look more natural than one big shadow.

01

What it does

Layered, natural-looking box shadows and linear, radial or conic gradients with OKLCH blending, and clean CSS to copy.

  • Layered shadows with presets
  • Inset, spread and opacity per layer
  • Linear, radial and conic gradients
  • OKLab and OKLCH colour blending with a fallback

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

CSS, with a Copy and a Download button on every result.

  • box-shadow
  • Gradients
  • OKLCH
  • CSS

Why it matters

Real shadows are soft near the object and fade out gradually, which one CSS shadow can't do. Stacking several light shadows, each twice the size of the last, gives the natural depth you see in polished interfaces, but it's tedious to write by hand.

Gradients have their own problem: blending two bright colours in standard sRGB often passes through a dull grey middle. Modern CSS can blend in OKLab or OKLCH instead, which keeps colours vivid. This builder writes both versions, so older browsers still get a gradient.

How it works

  1. InputShadow layers and gradient stops
  2. In your browserLayered box-shadow and gradient CSS written live
  3. OutputCopy-ready CSS with a preview

Where it fits in a designer's workflow

  1. Plan
  2. Design
  3. Build
  4. Test
  5. Launch
Polishing cards, buttons and backgrounds during build.

By the numbers

The ocean preset blended in sRGB and in OKLabsRGB: #5865f2, #4e85df, #43a6cc, #38c6b9, #2ee6a6. OKLab: #5865f2, #508be4, #47abd3, #3cc9bf, #2ee6a6Blended in sRGB0 to 100%Blended in OKLab0 to 100%
Computed from the tool's "ocean" preset (#5865f2 to #2ee6a6). Chroma (colourfulness, in OKLCH) dips in the middle of any blend between distant hues; the table shows how much in each colour space. Gradients that pass near grey look muddy, which is why the tool can blend in OKLab or OKLCH. Source: CSS Color Module Level 4: OKLab.
Show the numbers as a table
StopsRGB coloursRGB chromaOKLab colourOKLab chroma
0%#5865f20.209#5865f20.209
25%#4e85df0.148#508be40.148
50%#43a6cc0.107#47abd30.109
75%#38c6b90.118#3cc9bf0.118
100%#2ee6a60.168#2ee6a60.168

How to use it

  1. Choose Box shadow or Gradient.
  2. Start from a preset, then adjust the layers or colour stops.
  3. Change the card and page colours to match your design.
  4. Copy or download the CSS.

FAQ

Why use several shadow layers?

Each layer adds a little depth at a different distance, which looks like real light. One large shadow tends to look like a grey smudge.

What does OKLCH blending do?

It mixes colours the way people see them, so a blue to green gradient stays bright in the middle instead of going muddy.

Will the gradient work in older browsers?

Yes. The CSS has a standard line first and the OKLab or OKLCH line second; browsers that don't understand the second keep the first.

Can I use the keyboard?

Yes. Every slider has a number box next to it, and the tabs work with the arrow keys.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk