Who this helps
- Designers building cards and hero sections
- Developers learning CSS gradient syntax
Developer Design Utility
Create linear-gradient, radial-gradient, and conic-gradient CSS background code by adjusting colors, direction, type, and color stop positions with a live preview.
Combine gradient type, colors, angle, and target selector to create the CSS background code you want.
Choose a linear, radial, or conic gradient.
Used as the direction or rotation base for linear and conic gradients.
This is the starting color. You can enter a HEX color code.
This is the ending color. For UI that needs contrast, check the brightness difference.
Choose the CSS selector to use in the generated result.
Used only when Custom is selected.
The variable name used when generating CSS variable code.
Outputs both the :root variable and selector application code.
Adjust colors and direction to check the background preview in real time.
Gradient combinations commonly used for buttons, cards, hero backgrounds, and thumbnails.
You can use the code below in a CSS file or style attribute.
Select settings and click Generate CSS Code.
Preview linear, radial or conic gradients using two color stops. Adjust direction and stop positions, then copy a background-image declaration or save the CSS file.
Choose linear, radial or conic.
Enter the two HEX colors and their stop percentages.
For linear or conic, choose an angle; radial uses a centered circle.
Choose a selector and optionally a CSS variable, then generate.
After generation, valid edits update the code. Correct any error before copying or downloading.
Apply the declaration to an element with visible dimensions.
The second color continues beyond its 75% stop. The radial angle slider does not change this centered-circle output.
The tool assembles a gradient function from two colors and stop positions. It outputs background-image directly or through a :root custom property. The first stop must not be greater than the second; equal stops create a sharp transition.
Colors, selectors and variable names are processed in the browser. Copied or downloaded CSS contains those settings.
Check text against individual background colors.
Shape the card containing the gradient.
This tool outputs radial-gradient(circle, ...), with a fixed centered circle. Angle affects linear and conic output.
The tool asks you to correct a first stop greater than the second. Swap the colors to reverse the transition.
Only valid generated CSS is exported. Correct the color, selector, variable or stop order, or generate after loading a sample.