Developer Tools
CSS Gradient Generator
Build linear, radial and conic CSS gradients visually — add color stops, set the angle and copy the CSS (or Tailwind class) with a live preview.
How to use
- 1Choose linear, radial or conic, and set the angle.
- 2Edit, add or remove color stops, then copy the CSS.
Frequently asked questions
Do gradients work in all browsers?
Yes — linear, radial and conic gradients work in all modern browsers without prefixes.
How do I make a hard color stop?
Put two stops at the same position — e.g. red 50%, blue 50% — for a sharp edge.
Are CSS gradients better than images?
Usually — they're resolution-independent, tiny and easy to change.
Three gradient functions, one shared stop list
Linear, radial and conic gradients all take the same list of color stops with percentage positions — the only thing that changes between them is how that list gets painted: along a straight angle for linear, outward from a center point (as a circle or ellipse) for radial, or swept around a center point for conic. Switching between the three types in the tool keeps your stops intact, so you can compare how the same colors look under each mode.
Worked example: the default preset's CSS
The tool opens on a linear gradient at 135° between #6366f1 and #ec4899, which outputs: background: #6366f1; background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%); The first background line is a plain solid-color fallback — it's immediately overridden by the gradient in any browser that supports it, but keeps the element from rendering with no background at all in a context that strips background-image (some print stylesheets, very old browsers, or a reader mode).
A hard color stop is two stops, not a setting
There's no dedicated "hard edge" toggle — you get a sharp line between two colors by dragging two stops to the exact same position, e.g. #6366f1 at 50% immediately followed by #ec4899 at 50%. The tool doesn't special-case this; it's standard CSS gradient syntax, so the same trick works if you hand-edit the generated string later.
Conic gradients reuse the angle slider differently
For linear gradients the angle slider sets the direction light would travel across the box; for conic gradients the same slider becomes the from angle that the color sweep starts rotating at — useful for pie-chart segments, color wheels and circular loading indicators, which linear and radial gradients can't produce. Radial gradients drop the angle control entirely in favor of a circle/ellipse shape toggle, since "direction" isn't meaningful for a shape radiating from a center point.
Why the Tailwind output looks different from the plain CSS
Tailwind's built-in gradient utilities (bg-gradient-to-r and the from-/via-/to- color classes) only cover simple two- or three-stop linear gradients using colors already in your theme palette — they have no native utility for radial or conic gradients, or for linear gradients with custom hex stops that aren't part of your Tailwind config. To make the generator's output actually usable in a Tailwind project regardless of gradient type, the copied class uses Tailwind's arbitrary-value syntax instead, wrapping the full CSS gradient function directly inside square brackets, e.g. bg-[linear-gradient(135deg,#6366f1_0%,#ec4899_100%)] — functionally identical to the plain CSS output, just reshaped into a single class string Tailwind's JIT compiler can parse, with spaces swapped for underscores as Tailwind's arbitrary-value syntax requires. The trade-off is that arbitrary-value classes don't participate in Tailwind's design-token system the way bg-gradient-to-r and a theme color do — there's no shared variable to update in one place if the brand colors change later, so a gradient copied this way is meant for a one-off background rather than something referenced across dozens of components.
Related tools
- Color Picker & Converter (HEX, RGB, HSL, CMYK)
Pick a color or paste any code and convert between HEX, RGB, HSL, HSV and CMYK — with tints, shades and ready-to-copy CSS values.
- Color Contrast Checker (WCAG)
Check text and background colors against WCAG 2.2 AA and AAA contrast requirements — with a live preview and a suggested fix when a pair fails.
- Code Beautifier (HTML, CSS, JavaScript)
Beautify messy or minified HTML, CSS and JavaScript into clean, consistently indented code you can read and edit.
- CSS & HTML Minifier
Minify CSS or HTML to shrink file size — strips comments and whitespace and shows how many bytes you saved.
- High-Contrast & Dark-Mode PDF
Recolour a PDF for easier reading: dark mode, inverted, yellow on black, black on yellow, cream paper or darker faint text. Text stays sharp and selectable, and the file works in any PDF reader or e-reader app.
- Color Picker from Image & Palette Extractor
Click anywhere on an image to get the exact HEX and RGB color, and extract its dominant color palette — for designs, brands and websites.