CSS Gradient Generator
CSS Gradient Generator
Create linear, radial, and conic gradients with a live preview, then copy the CSS.
Enter a valid HEX code, such as #0E5A68.
Linear, Radial and Conic Gradients: Types, Angles and CSS
A CSS gradient is a smooth transition between two or more colors, written directly in CSS with no image file. A gradient generator lets you build one visually and copy the finished code. This tool supports linear, radial, and conic gradients with up to eight colors, and it can output code for backgrounds, gradient text, and gradient borders.
What Is a CSS Gradient Generator?
How to Use the Tool
- Pick a type and colors Choose Linear, Radial, or Conic, then set your colors or start from a preset.
- Adjust the details Change the angle, move each color's position, and watch the preview update live.
- Copy the CSS Select Background, Text, or Border, then press Copy CSS and paste it into your stylesheet.
Gradient Types and When to Use Them
The examples below show the format this tool generates.
| Type | Example | Common use |
|---|---|---|
| Linear | linear-gradient(90deg, #0E5A68 0%, #A9D94B 100%) | Page backgrounds, buttons, banners, headers |
| Radial | radial-gradient(circle, #0E5A68 0%, #A9D94B 100%) | Glows, spotlights, soft backgrounds |
| Conic | conic-gradient(from 0deg, #0E5A68 0%, #A9D94B 100%) | Pie-style charts, color wheels, sweeping effects |
Gradient Background, Text, and Border in CSS
The same gradient can be applied in three common ways. Choose the one you need under Apply to.
Gradient background
Add a solid background-color line before it as a fallback for very old browsers.
Gradient text
The gradient is painted behind the text and clipped to the letter shapes. Check that the colors stay readable against your page background.
Gradient border
border-image ignores border-radius, so the corners stay square. For rounded corners, put the gradient on a wrapper element with padding, then give the inner element its own background and radius.
Key Features
- Three gradient types: linear, radial, and conic in one tool.
- Live preview: every change shows instantly, including text and border modes.
- Up to 8 colors: edit each color with a picker or a HEX code and set its exact position.
- Quick controls: add, reverse, randomize, or reset colors, and start from presets.
- Ready-to-paste CSS: copy the code in one click.
- Private by design: everything runs in your browser and nothing is uploaded.
Tips for Better-Looking Gradients
- Keep colors close in hue: neighboring colors blend smoothly, while distant ones can look muddy in the middle.
- Add a middle color: a third stop can steer the blend away from a dull midpoint.
- Mind the contrast: text placed on a gradient must stay readable at both ends of it.
- Use subtle angles: small changes such as 135° often look more natural than 90°.
Ready to build a gradient? Go back to the tool above and choose your colors.
Worked example: a two-colour linear gradient
The angle decides the direction the colours travel. At 90deg the gradient runs from left to right, starting with the deep petrol and ending with the lime; at 0deg it runs from bottom to top, and at 180deg from top to bottom. With only two colours and no positions given, the first colour sits at 0% and the second at 100%, with an even blend between them. Adding a position, such as #A9D94B 75%, pushes the midpoint of the blend towards the end and keeps more of the first colour on show.
Frequently asked questions
Is the CSS Gradient Generator free to use?
Is my data kept private?
How do I make gradient text in CSS?
background-clip: text, and set the text color to transparent. Select Text under Apply to and this tool generates all of those lines for you.Why does my gradient border ignore border-radius?
border-image property does not follow rounded corners. To keep a rounded shape, give a wrapper element the gradient background and some padding, then place an inner element with its own background and border radius inside it.