CSS Gradient

CSS Gradient Generator

Pick colors and drag the stops on the bar to design a gradient for backgrounds and buttons. Choose linear or radial, set the angle or center, and copy the CSS code. Click the bar to add a stop.

Type

Color stops

Click the bar to add a stop. Drag the markers to move them.

    Presets

    CSS

    • Gradients written this way work in all current browsers, so -webkit- prefixes are not needed.
    • For text on a gradient, check readability against both ends of the gradient with the Color Contrast Checker.
    • A gradient with very similar colors can show visible bands on some screens. Adding a middle stop often helps.

    About this tool

    Design CSS linear and radial gradients with a live preview and copy the code. Add, remove and drag color stops, set opacity, angle, shape and center position, or start from presets such as Sunset, Ocean and Rainbow. Everything runs in your browser.

    How to use

    1. Choose Linear or Radial under Type. For linear, set the Angle with the slider or the arrow buttons; for radial, pick the Shape and Center.
    2. Click the bar under Color stops to add a stop, and drag the markers to move them. Set the color, position and opacity of each stop in the list below.
    3. Start from a preset or Random if you like, and use Reverse to flip the order of the colors.
    4. Click Copy next to CSS and paste the code into your stylesheet. Tick the fallback option to add a solid background-color as well.

    Useful for

    • Creating backgrounds for hero sections and page sections
    • Trying out color schemes for buttons, banners and headings
    • Turning colors from a design mockup into CSS
    • Making a transparent-to-color overlay so text stays readable on photos

    FAQ

    What is a CSS gradient?

    A way to show a smooth transition between colors by writing linear-gradient() or radial-gradient() in the background property, without an image. It is lighter than an image and stays sharp at any size.

    Do I need -webkit- prefixes?

    No. The code this tool outputs works in all current major browsers.

    Can I make a transparent gradient?

    Yes. Each color stop has an opacity setting (0–100%), and semi-transparent colors are written as rgb(… / …%).

    Does it support conic or repeating gradients?

    No. The tool creates linear and radial (circle or ellipse) gradients only.

    Need a website design that stands out?

    From color schemes and banners to full websites, we design with your brand in mind.

    Contact us
    Contact