CSS Gradient Maker

Design a linear or radial gradient with up to five colors, preview it live, and copy CSS that's ready to paste.

Presets
Type

Color stops

    How to use

    1. Choose Linear and set the angle, or choose Radial and pick circle or ellipse.
    2. Set each color stop's color and its position from 0% to 100%. Use Add stop for up to five colors, or Remove to drop one (at least two stay).
    3. Watch the preview update as you change values.
    4. Press Copy CSS and paste the two lines into the rule for your element.
    5. Short on ideas? Tap a preset chip to load a ready-made gradient, then adjust it. Copy link saves the exact gradient in the page address, so you can bookmark it or send it to someone.

    How it works

    A CSS gradient is an image the browser draws from a list of color stops. Each stop is a color and a position along the gradient line, and the browser blends smoothly between neighboring stops. The syntax comes from the W3C CSS Images Module Level 3:

    linear-gradient(<angle>, <color> <position>, <color> <position>, …) radial-gradient(<circle | ellipse>, <color> <position>, …)

    For a linear gradient, the angle sets the direction of the gradient line: 0deg points up and angles turn clockwise, so 90deg runs left to right. For a radial gradient, the line runs from the center outward, and the shape decides whether it spreads as a circle or an ellipse that fits the box.

    The tool checks that every color is a valid HEX code and every position is between 0% and 100%, sorts the stops by position so the output reads in order, and adds a solid background-color (the first stop) before the gradient as a fallback.

    When you copy a link, the gradient is written after the # as short fields: t for the type, a for the angle or sh for the radial shape, and s for the stops as color.position pairs. Opening the link reads those fields back, checks them with the same rules, and loads the gradient; a damaged link is ignored and the default gradient shows instead.

    AngleDirection
    0degBottom to top
    90degLeft to right
    180degTop to bottom (the CSS default)
    270degRight to left

    Worked example

    A diagonal three-color gradient: 135°, tomato at 0%, cream at 60%, mint at 100%:

    background-color: #e2553f; background-image: linear-gradient(135deg, #e2553f 0%, #f3e3c8 60%, #cfe8dc 100%);

    A link to it ends in #t=linear&s=e2553f.0%2Cf3e3c8.60%2Ccfe8dc.100&a=135.

    A radial glow: white in the center fading to dark green:

    background-color: #ffffff; background-image: radial-gradient(circle, #ffffff 0%, #2f6b55 100%);

    Stops entered out of order (mint at 100% first, then tomato at 0%) come out sorted: linear-gradient(90deg, #e2553f 0%, #cfe8dc 100%).

    Limits

    • Colors are entered as HEX (3 or 6 digits); named colors and transparency aren't supported in the stop fields.
    • The tool writes basic linear and radial gradients. It doesn't do conic or repeating gradients, color hints, or interpolation in other color spaces such as in oklch.
    • Radial gradients are always centered and use the default size (farthest corner). Edit the CSS by hand to move the center.
    • Stops are sorted by position in the output. If you put two stops at the same position you get a hard edge, which is valid but may not be what you meant.
    • Gradients can lower text contrast at the lightest or darkest point. Check text over a gradient at its weakest spot.
    • A copied link stores the gradient after the # in the address. It works in any browser, but nothing is saved on a server, so changing the gradient later doesn't change links you have already sent.

    FAQ

    Why is there a background-color line in the CSS?

    It is a fallback. If the gradient can't be drawn, for example in an old email client, the element still gets a solid color. Browsers that support gradients paint the background-image on top of it.

    What does the angle mean in a linear gradient?

    It is the direction the gradient travels: 0deg goes bottom to top, 90deg left to right, 180deg top to bottom, and 270deg right to left. Angles in between run diagonally.

    What is the difference between circle and ellipse?

    A circle gradient spreads out evenly in every direction. An ellipse stretches to match the shape of the element, so on a wide box it is wider than it is tall. Ellipse is the CSS default.

    How do I make a sharp stripe instead of a smooth blend?

    Put two stops at the same position. For example, red at 50% and blue at 50% makes a hard line in the middle with no blend.

    How do I save a gradient to use later?

    Press Copy link and bookmark the address, or paste it into your notes. Opening the link loads the same type, angle or shape, and color stops, ready to adjust or copy as CSS.

    Can I use the gradient as a text color?

    Not directly, because gradients are images. The common approach is to set the gradient as the background-image, then use background-clip: text with a transparent text color.