Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    How to Make a CSS Gradient: Linear, Radial and Conic

    Updated November 2026

    Written by the Toolpuffin team. Tools in this guide are tested in the browser.

    A CSS gradient is a smooth change between colours, made by the browser without an image. This guide explains the three types and how to build one visually.

    Try the tool: CSS Gradient Generator

    The three types

    TypeHow it changesCSS
    LinearAlong a linelinear-gradient(90deg, #0b6b5c, #ffd166)
    RadialOutwards from a centre pointradial-gradient(circle, #0b6b5c, #ffd166)
    ConicAround a centre point, like pie slicesconic-gradient(#0b6b5c, #ffd166, #0b6b5c)

    Source: MDN: CSS gradients

    Angles and colour stops

    • The angle of a linear gradient sets the direction: 90deg goes left to right, 180deg top to bottom.
    • Each colour can get a position, such as 40%, which sets where it is at full strength.
    • Several colours with their own positions make hard bands or a softer fade.

    Build one

    1. Choose the type and the angle.
    2. Pick the colours and move their positions.
    3. Copy the CSS.

    The fallback line

    The tool puts a plain colour on the first line, for very old browsers that do not understand gradients. Modern browsers use the gradient on the second line.

    Text and borders

    A gradient also works on text and borders, but that needs extra CSS, such as background-clip for text. The tool only makes the gradient itself.

    Keep text readable

    Check the contrast of text that sits on a gradient at its lightest and its darkest point, not only in the middle.

    More guides