CSS Gradient Generator

CSS Gradient Generator

Create linear, radial, and conic gradients with a live preview, then copy the CSS.

Type
90°
Colors
    Presets
    Apply to

    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

    1. Pick a type and colors Choose Linear, Radial, or Conic, then set your colors or start from a preset.
    2. Adjust the details Change the angle, move each color's position, and watch the preview update live.
    3. 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.

    TypeExampleCommon use
    Linearlinear-gradient(90deg, #0E5A68 0%, #A9D94B 100%)Page backgrounds, buttons, banners, headers
    Radialradial-gradient(circle, #0E5A68 0%, #A9D94B 100%)Glows, spotlights, soft backgrounds
    Conicconic-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

    Code example background: linear-gradient(90deg, #0E5A68 0%, #A9D94B 100%);

    Add a solid background-color line before it as a fallback for very old browsers.

    Gradient text

    Code example background: linear-gradient(90deg, #0E5A68 0%, #A9D94B 100%); -webkit-background-clip: text; background-clip: text; color: transparent;

    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

    Code example border: 8px solid transparent; border-image: linear-gradient(90deg, #0E5A68 0%, #A9D94B 100%) 1;

    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

    CSS background: linear-gradient(90deg, #0E5A68, #A9D94B);

    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?
    Yes. It is free, needs no sign-up, and runs directly in your browser.
    Is my data kept private?
    Yes. The gradient is built in your browser with JavaScript. Nothing you create is uploaded, stored, or sent to a server.
    How do I make gradient text in CSS?
    Apply a gradient as the background, clip it to the text with 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?
    The 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.
    How many colors can I use?
    You can use between 2 and 8 colors. Each color has its own position, so you can control exactly where it starts to blend.
    Do CSS gradients work in all browsers?
    Linear, radial, and conic gradients are supported in all current major browsers. Only very old browsers lack support, which is why a solid fallback color is a good habit for important designs.