Skip to main content
All articles

Developer

How to Tune CSS Gradients, Shadows, and Contrast Without Guessing

The last ten percent of a UI is gradients, shadows, and contrast — the fiddly details that eat time until you preview them instead of guessing.

4 min readMay 4, 2026GainUtility

The last ten percent of a UI is often the fiddliest. Getting a gradient to feel right, a shadow to sit naturally, or a border radius to look intentional takes almost as long as the whole design before it. The pattern that ends the guessing is simple: preview, don't type.

Gradients are forgiving until they aren't

A simple two-colour gradient is easy by hand. Add more stops, change the angle, or match a brand colour and the CSS gets harder to reason about. A visual preview shows the result while you adjust the stops.

Shadows rarely work first try

A natural shadow needs the right offset, blur, spread, and a colour that isn't pure black. Nudging numbers in code to find that combination is slow — a live preview halves it.

Contrast is a number, not a feeling

A colour that looks fine can still fail WCAG contrast, which matters if anyone with a visual impairment reads that text. It's cheaper to check the pair early than to redo a button style late.

Copy-paste beats retyping

The point of these tools is that you adjust visually and copy finished CSS instead of re-typing it from memory. That's the entire advantage — the fiddly part becomes a preview and a paste.