CSS Gradient Generator
StylingEverything runs locally in your browser — nothing is uploaded
Adjust the parameters, watch the preview, copy the code. The preview is the point — a gradient changes a great deal for a small change in angle or position, and reading `linear-gradient(90deg, #3366ff 0%, #a855f7 100%)` tells you nothing about how it looks. So every change redraws immediately, and you copy the CSS below once it looks right. All three gradient types are here. Linear (`linear-gradient`) transitions along a straight line; radial (`radial-gradient`) expands from a centre; conic (`conic-gradient`) sweeps around a centre. Conic is the one people forget, and it is the easiest route to progress rings, hue wheels and pie charts. The angle means "which direction" for linear and "where the sweep starts" for conic. Why the middle stop is a toggle rather than "add as many as you like": arbitrary stops need a custom list control — add and remove rows, drag to reorder — and that interaction does not fit into this row of options. Start, middle and end cover the large majority of real uses, and for four or more, hand-writing that one declaration is faster than clicking around.
Features
- Linear, radial and conic gradients
- An adjustable 0–360 angle that drives both linear and conic
- Colour pickers for the endpoints instead of typing values
- An optional middle stop with an adjustable 0–100% position
- Every change redraws the preview instantly — there is no Generate button
- A copyable CSS rule below, with a `.gradient` selector
- Syntax-highlighted code with a one-click copy button
- A chequerboard behind the preview, so translucency and edges are visible
- Colours and the angle are validated, so the CSS that comes out is always valid
- Everything is computed in your browser; nothing is uploaded
How to use
- Pick the type: linear, radial or conic
- Drag the angle and use the colour pickers — the preview follows at once
- For a three-colour transition, tick "middle stop" and adjust its colour and position
- When it looks right, hit the copy button and take the CSS
FAQ
- Which of the three should I use?
- Linear is the general-purpose one: button fills, card highlights, layered page backgrounds — the angle sets the direction (`90deg` left to right, `0deg` bottom to top). Radial suits anything with a centre: a spotlight, a sphere highlight, a glow fading outward. Conic distributes colour around a centre, which makes it the easiest way to build a progress ring, a hue wheel or a pie chart — it is the one people forget, but if you want colour divided by angle, it is the only one that does that.
- How is the angle measured, and why is 0 not left-to-right?
- CSS `0deg` points upward (bottom to top) and the angle increases clockwise: `90deg` is left to right, `180deg` top to bottom, `270deg` right to left. This follows from the CSS coordinate system (y grows downward) while gradient angles follow the mathematical convention. You can also use keyword directions (`to right`, `to bottom right`); the difference from a fixed angle is responsiveness — a keyword adjusts its angle to cross the diagonal of whatever aspect ratio the element has, whereas a fixed angle does not.
- What happens to the CSS when the middle stop is off?
- It is left out entirely, rather than emitting a "50%, same colour as both ends" stop. Such a stop looks like it does something in the code while doing nothing — and it makes people afraid to delete it later. So with the box unticked there are exactly two stops in the code. What you see in the preview and what you copy are guaranteed to be the same code: the shell has a guardrail asserting that every declaration applied to the preview also appears in the delivered CSS.
- Can I use the colours for something else?
- Yes — the endpoint values are ordinary hex, so you can copy them out and work with them. To derive a full set around one of them (monochromatic, complementary, triadic…), use the colour schemes tool; to browse 180 ready-made gradients for inspiration, use the gradient colours tool. Both complement this one: here you build a gradient from scratch, there you pick from a library.
Related tools
Gradient Colours
Lookups180 ready-made gradients with a live preview and copyable CSS. Search by name, by colour or by hue family, and lift a single colour out of any gradient.
Colour Schemes
LookupsEnter a base colour and get seven harmonies — monochromatic, analogous, complementary, split, triadic, tetradic, neutral — each with when to use it.
Color Converter
ConvertConvert between HEX, RGB, HSL, HWB, CMYK, Lab and OKLCH, with colour temperature, inverse, complement, nearest ANSI colour and WCAG contrast.
CSS Border Radius
StylingSet each corner radius, preview it live and copy the CSS. px, rem or percent — and the preview shows why a percentage gives an ellipse.
Glassmorphism Generator
StylingAdjust blur, opacity, saturation and border, preview the glassmorphism live and copy the CSS, -webkit- prefix included so it works on iOS.
Neumorphism Generator
StylingAdjust distance, blur, intensity and direction to preview neumorphism and copy the CSS. Both shadow colours derive from the surface, hue intact.