Cette page n’est pas encore traduite en français : elle s’affiche en anglais.

CSS Gradient Generator

Design a gradient visually — drag color stops, change the angle or type, start from a preset — and copy production-ready CSS with a solid fallback color.

Mis à jour le

Color stops

Click the bar to add a stop, drag the handles (or focus one and use the arrow keys) to move it. Stops accept HEX, rgb(), hsl() and transparency such as #0000 or rgb(0 0 0 / 0.5).

Type
Modern browsers use the extra line; older ones keep the sRGB version.
CSS

    

Presets

Vos données ne quittent jamais votre ordinateur. Tout le traitement se fait localement dans votre navigateur.

Comment utiliser : CSS Gradient Generator

  1. Pick a preset or start from the default gradient.
  2. Choose Linear, Radial or Conic and set the angle, shape or position.
  3. Edit the color stops: click the bar to add one, drag handles to move them, type exact colors and positions in the list.
  4. Optionally pick an OKLab/OKLCH interpolation for smoother blends, then click Copy CSS.

What is a CSS gradient?

A CSS gradient is an image generated by the browser that transitions between two or more colors. Because it’s an <image>, you use it in background, background-image, border-image or mask-image — not in background-color. Gradients need no HTTP request, scale to any size without blurring and can be animated or layered.

Linear, radial and conic gradients

TypeExampleTypical use
Linearlinear-gradient(135deg, #ff7e5f 0%, #feb47b 100%)Hero backgrounds, buttons, image overlays
Radialradial-gradient(circle at top, #fff 0%, #312e81 100%)Spotlights, glows, vignettes
Conicconic-gradient(from 0deg at center, red, yellow, lime, aqua, blue, magenta, red)Color wheels, pie charts, loaders

In a linear gradient 0deg points up and 90deg points right (the same as to right). Conic angles start at the top and run clockwise.

Color stops and hard edges

Each stop is a color plus an optional position. When two stops share the same position the transition becomes a hard edge — that’s how you build stripes or the Pie chart preset: #4f46e5 0% 40%, #22c55e 40% 75%. To fade content into the page, end with a transparent version of the same color (e.g. #00000000), which avoids a muddy gray band.

Smoother gradients with OKLab and OKLCH

By default browsers interpolate in sRGB, so blue → yellow passes through a dull gray. CSS Color 4 lets you choose the color space: linear-gradient(90deg in oklab, blue, yellow) stays bright and even, and in oklch travels around the hue wheel. The generator outputs a plain sRGB declaration first and the interpolated version second, so browsers that don’t understand the syntax simply ignore the last line.

Using gradients in Webflow

Webflow’s Style panel has built-in linear and radial gradient editors under Backgrounds — copy the angle and stop colors from this tool into it. For anything the panel doesn’t expose, such as conic gradients or in oklch interpolation, paste the CSS into a <style> block in an Embed element or the page’s custom code and target your class. Need matching shadows? Try the Box Shadow Generator, or check text on top of your gradient with the Contrast Checker.

Aussi recherché comme : gradient generator, linear-gradient, radial-gradient, conic-gradient, css background, color stops, gradient maker, oklch gradient.

Outils complémentaires : CSS Gradient Generator

  • SVG Pattern Generator — Give sections and cards a subtle texture with seamless SVG patterns: dots, grids, diagonal lines, zigzags, waves, plus signs, checkerboards, circles, triangles and more.
  • Color Converter — Paste any CSS color — HEX, rgb(), hsl(), hwb(), oklch() or a name like tomato — and get every other format instantly, plus a ready-to-use 50–950 palette.
  • SVG to CSS Converter — Paste an SVG and get a compact, URL-encoded data URI plus ready-made background-image and recolorable mask-image CSS.
  • Générateur d’images OG — Créez en quelques secondes une image d'aperçu de lien soignée pour Facebook, LinkedIn, X, Slack et WhatsApp : choisissez un modèle, saisissez votre titre, ajoutez un logo, puis téléchargez le fichier PNG et les balises méta correspondantes.

Questions fréquentes

How do I make a gradient transparent?
Use a color with alpha for one of the stops, e.g. linear-gradient(180deg, rgb(0 0 0 / 0.7), rgb(0 0 0 / 0)). Fading to the same color at zero alpha avoids the gray band you can get with the transparent keyword in older browsers.
Why is my gradient muddy or gray in the middle?
Colors on opposite sides of the color wheel (blue and yellow, red and green) pass through gray when blended in sRGB. Choose OKLab or OKLCH interpolation, or add a vivid middle stop.
Can I apply a gradient to text?
Yes: set the gradient as the background, then add background-clip: text; -webkit-background-clip: text; color: transparent;. Keep a solid color fallback for readability, and check contrast against the page.
Why does the CSS include a solid background color first?
It’s a fallback for environments that can’t render gradients (some email clients, very old browsers) and it’s shown while the page paints. The tool uses the average of your stop colors.
How do I animate a CSS gradient?
Gradients can’t be transitioned directly in most browsers. Common workarounds are animating background-position on an oversized gradient, or registering custom properties with @property and animating the stop colors or angle.
Puis-je installer CSS Gradient Generator en tant qu’application web et l’utiliser hors ligne ?
Oui. CSS Gradient Generator est une application web installable (PWA) : elle s’installe depuis votre navigateur, sans passer par une boutique d’applications. Cliquez sur « Installer l’application » en haut de cette page dans Chrome ou Edge (Windows, macOS, Linux, ChromeOS) ; sur Android, utilisez « Partager » → « Ajouter à l’écran d’accueil » sur iPhone et iPad ; ou « Fichier » → « Ajouter au Dock » dans Safari 17+ sur Mac. L’application s’ouvre alors dans sa propre fenêtre avec sa propre icône, et comme elle s’exécute entièrement dans votre navigateur, elle continue de fonctionner hors ligne. Firefox sur ordinateur de bureau ne permet pas d’installer d’applications web. Comment fonctionne l’installation.

Outils similaires