CSS Gradient Generator
Build a CSS gradient and copy the code.
Also called: CSS gradient maker, linear gradient generator.
CSS Gradient Generator
Build a CSS gradient and copy the code.
Watch: how to use the CSS Gradient Generator (12 seconds)
Recorded on a phone, steps written on screen, no sound.
About the CSS Gradient Generator
Build a linear or radial CSS gradient from two or three colours and an angle, preview it and copy the CSS.
Linear and radial CSS gradient basics
A CSS gradient is an image value that blends two or more colour stops. A linear gradient blends along a direction or angle; a radial gradient spreads outward from a point or ellipse. An optional third colour creates an additional stop for a more gradual transition.
The generated CSS can be used as a background or background-image value. For example, a simple two-colour linear gradient uses the form linear-gradient(90deg, #ffffff, #3366ff). Change the angle and colour stops to match the direction and contrast your layout needs.
Check the gradient behind real text and controls at desktop and mobile sizes. A gradient can have low contrast in one area even when its start and end colours look clear; use a solid overlay or adjust the stops when readability changes across the surface.
How to use the CSS Gradient Generator
- Add your inputFill in angle, colour 1, colour 2 and colour 3. An example is already filled in, so you can press Run tool first to see how it works.
- Pick the optionstype (the defaults suit most uses).
- Press Run toolThe result appears right under the button.
- Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.
This tool works inside your browser: what you enter stays on your device.
Example
A sample input and the result the CSS Gradient Generator gives for it (produced by the tool itself, not typed by hand).
- Type
- Linear
- Angle
- 90
- Colour 1
- #ff7a18
- Colour 2
- #af002d
Result:
background: linear-gradient(90deg, #ff7a18, #af002d); /* fallback for very old browsers */ background: #ff7a18; background: linear-gradient(90deg, #ff7a18, #af002d);
Good to know
- What you need
- You type or choose: Angle, Colour 1, Colour 2, Colour 3
- Where it runs
- In your browser, on your device.
- Cost
- Free, no sign-up.
Questions
What does the angle do?
90° goes left to right, 180° top to bottom.
Can I use it as a text colour?
Yes, with background-clip: text.
More tools in Design
- Image Colour Palette Extractor
- Lorem Ipsum Generator
- PX ⇄ REM Converter
- Screen Colour Picker (eyedropper)
- Screenshot Mockup (browser or phone frame)
- SVG Minifier
- App Icon & Favicon Generator (ZIP)
- Aspect Ratio Calculator
- Chart Maker (bar, line, pie)
- Colour Contrast Checker
- Colour Converter
- Colour Palette Generator