CSS

Gradients and surfaces as CSS you paste, measured as they will paint.

All 4 CSS tools

Every one runs in your browser. Nothing is uploaded and nothing is metered.

What CSS generators are

Visual editors that write a CSS value — a gradient, a shadow, an outline — from controls rather than by hand, and show it on a preview. The useful ones also measure the painted result, because a value that looks right on a swatch can still put text on a background it cannot be read against.

Generators for the CSS that paints a surface — gradients, shadows with glass and soft UI, focus rings, and SVG backgrounds of waves, blobs and patterns. Each one hands you code to paste, and each one measures what that code will actually paint before you paste it.

The colour tools decide which colours to use. These decide how a surface is painted with them, and check the result where it matters: under the text that sits on it.

Measured as it will paint

A CSS generator usually stops at the code. The questions that decide whether the code works come afterwards: can the headline be read across the whole gradient, will the gradient band on a large screen, what happens in a browser that does not understand the syntax. These tools answer them in the editor, from the same pixels the preview shows.

The measurements are computed, not looked up. Contrast is read at the worst pixel behind each piece of text, with WCAG 2 and APCA side by side; banding is the count of 8-bit steps along the gradient’s real path; every export prints its size in bytes and, where a value needs one, carries a fallback guarded by @supports.

What makes these CSS tools different

  • The worst pixel decides, never the average

    A background with a light end and a dark end averages to a ratio no part of the text actually gets. Wherever text sits on a painted surface here (a gradient, glass, an SVG background), the tool reports the lowest ratio under each text box, says where it is, and offers the lightest scrim that would fix it. The focus indicator checker holds rings to the same rule: it counts only the pixels that change by 3:1.

    Of 382 presets in a popular open gradient list, 146 pass 4.5:1 on average for white or black text while failing at their worst pixel.

  • Modern CSS, with the fallback written for you

    OKLCH blending and other recent syntax are used where they improve the result, and older browsers get an equivalent behind an @supports test. A custom property cannot fall back by cascade, so the variable export never relies on it.

    Gradient colour-space interpolation needs Chrome 111, Safari 16.2 or Firefox 127; Tailwind v4 itself targets Chrome 111, Safari 16.4 and Firefox 128.

  • One engine under every CSS tool

    The gradient, shadow and SVG background generators share one preview surface and one contrast sampler, so a hero, a card and a button look and measure the same way whichever of them painted it. All four tools share the export panel and the shareable link, so a link opens exactly the state that was shared.

How to do it

The order that works, and why each step changes the answer.

  1. Decide the colours first

    Choose the palette in the colour tools, where contrast between pairs is the subject. Bring the hex values here to decide how the surface is painted with them.

  2. Preview on the element it is for

    Switch the preview between hero, card and button. A gradient that suits a full-width hero often bands or crowds the text on a 320-pixel card.

  3. Fix what the readout names

    Change the stop nearest the worst pixel, the text colour, or add the scrim the readout gives. Re-read the figure rather than the look.

  4. Export in the form your project uses

    Plain CSS, custom properties, a Tailwind v4 utility or an inline style. Check the byte count; grain and fallbacks are worth their size, decoration may not be.

Worked examples

Real inputs, real numbers. Pick one.

A slate hero that bands on a large monitor

You give it

#0f172a to #1e293b across 1440 pixels.

You get

The colour changes only 50 times, so bands are up to 72 pixels wide. Chrome and Safari dither on screen; Firefox and image exports may not. 3% grain removes the stripes everywhere for 366 bytes.

Which CSS tool do you need?

Start from the job, not the tool name.

Against a typical CSS generator

AspectdsynA typical CSS generator
Text on the resultWorst-pixel WCAG 2 and APCA per text boxNot measured
Older browsersFallback written and guarded with @supportsModern syntax only, or none
PreviewHero, card and buttonA bare rectangle
ExportCSS, custom properties, Tailwind v4, inline, with bytesCSS

The figures behind that

  • The CSS colour module, level 4, blends hex, named, rgb() and hsl() stops in gamma-encoded sRGB for compatibility; any other colour or an explicit in oklch switches to a perceptual space.

  • Chromium and WebKit dithered a 1440-pixel dark gradient when measured on 8 October 2026; a renderer that does not dither shows bands up to 72 pixels wide on the same gradient.

  • Of 382 open gradient presets measured, 38 lose over half their chroma through the middle in sRGB, and all 38 keep it in OKLCH.

  • On a slate-800 card over a slate-900 page, each of Tailwind v4’s six shadow sizes adds under 0.06 to the 1.22:1 edge the two colours already give: in dark mode a shadow has almost nothing left to darken.

  • Two of the largest SVG background generators, Haikei and fffuel, gave files that SVGO shrinks by 48% and 38% when measured on 8 October 2026, and neither keeps the shape in its link.

  • WCAG 2.2 Focus Appearance is success criterion 2.4.13, Level AAA. The “2.4.11 Focus Appearance (Minimum), AA” many guides still quote was draft text, renumbered and moved to AAA in May 2023, before WCAG 2.2 was published.

Keep exploring