🌈 CSS Gradient Generator

A complete gradient designer — linear, radial, conic & repeating, with unlimited color stops, 90+ presets, live preview, and export to CSS, SCSS, Tailwind, React, Flutter, SwiftUI, SVG, PNG and more. 100% in your browser.

🎛️ Type

🎨 Color Stops

📥 Import

💻 Output

♿ Contrast & Accessibility text over gradient

⭐ Favorites

No favorites yet — design a gradient and click ⭐ Favorite.

🎨 Preset Library 90+ gradients · click to apply

ℹ️ Everything runs in your browser — nothing is uploaded, no login, and it works offline once loaded. Favorites are saved only in your browser's local storage. Conic gradients and 8-digit hex need a modern browser (Chrome, Firefox, Safari, Edge, Opera).

ℹ️ About This Tool

The CSS Gradient Generator has grown into a complete gradient designer — a fast, private, browser-based studio for building beautiful gradients visually and exporting them to whatever platform you are working on. Gradients are everywhere in modern design: hero backgrounds, buttons, cards, glassmorphism panels, text effects, charts and mobile UIs. But hand-writing gradient CSS is fiddly — remembering the angle convention, juggling colour stops and their percentages, and then re-writing the whole thing for SCSS, Tailwind, React, Flutter or SwiftUI. This tool lets you design once, visually, and get correct, ready-to-paste code for all of those targets, with a live preview so you see exactly what you will ship.

It supports every gradient type CSS offers. Linear gradients run along an angle you control with a slider, a numeric input or one of eight direction presets (top, bottom, left, right and the four corners). Radial gradients radiate from a point, with a choice of circle or ellipse shape and nine positions. Conic gradients sweep around a centre — perfect for pie-chart looks, colour wheels and loading spinners. Each of these also has a repeating variant, toggled with a single checkbox, for stripes, rays and patterns. You can add an unlimited number of colour stops, and for each stop pick the colour, set its opacity (alpha) and drag its position from 0% to 100%; stops can be duplicated, deleted, reversed, or shuffled with a random generator that produces tasteful, harmonious combinations rather than random noise.

The live preview is more than a flat swatch. You can preview the gradient as a full background, a rounded card, a button, a circle, gradient-clipped text, or a gradient border — so you can judge how it will actually look in context before committing. Because real projects use many colour syntaxes, the output can render stop colours as HEX, RGB, RGBA, HSL or HSLA, and the code panel can produce your gradient as plain CSS, CSS with vendor prefixes, CSS custom properties, SCSS, LESS, a Tailwind arbitrary value, a React inline style object, a Vue style binding, an Angular style binding, a Flutter LinearGradient, a SwiftUI gradient, an Android XML drawable, or an SVG <linearGradient>. One dropdown switches between them all.

Beyond code, the tool exports assets. You can download the gradient as a PNG image (rendered on a canvas at high resolution), as a standalone SVG, as a CSS snippet, or as a JSON file that captures the full design so you can re-import it later. A built-in preset library of more than ninety hand-picked gradients — organised into Sunset, Ocean, Fire, Forest, Rainbow, Purple, Pastel, Glass, Gold and Neon categories — gives you a professional starting point in one click, which you can then tweak. A favorites system saves your own gradients to your browser so you can build a personal palette, and an import box lets you paste any existing gradient CSS (or JSON) and edit it visually — ideal for reverse-engineering a gradient you found elsewhere.

For accessible design, a contrast panel estimates the WCAG contrast ratio of white and black text over your gradient, so you can tell at a glance whether a caption or button label placed on top will be readable. The whole tool is engineered to be lightweight and instant: gradients render with native CSS (no heavy libraries), DOM updates are minimal, and everything responds live as you drag a slider. It is fully responsive, working just as well on a phone as on a wide desktop, and it is completely private — no colour, gradient or design you create is ever uploaded to a server, there is no sign-up, and it works offline once loaded.

Who is it for? Frontend and web developers who need production-ready gradient code across frameworks; UI/UX designers exploring colour and mood; mobile developers who want the same gradient in Flutter, SwiftUI or Android; students learning how CSS gradients and colour work; and anyone who wants a beautiful background, button or hero without opening a heavy design app. Whether you start from a preset and tweak, paste in existing CSS to refine it, or build from scratch stop by stop, this designer turns gradient work from fiddly guesswork into a fast, visual, export-anywhere workflow.

✅ Key Benefits

  • Every gradient type — linear, radial, conic and their repeating variants.
  • Full control — unlimited stops, alpha, angle slider/number, direction presets, random and reverse.
  • Real preview — background, card, button, circle, text and border.
  • Export anywhere — CSS/prefixes/variables, SCSS, LESS, Tailwind, React, Vue, Angular, Flutter, SwiftUI, Android, SVG.
  • Assets — download PNG, SVG, CSS, JSON and TXT.
  • 90+ presets across ten categories, plus favorites and CSS import.
  • Accessible — WCAG contrast estimate for text over the gradient.
  • Private & offline — 100% browser-based, no upload, no login.

ℹ️ इस टूल के बारे में

यह CSS Gradient Generator अब एक पूरा gradient designer बन गया है — सुंदर gradients को विज़ुअली बनाने और जिस platform पर आप काम कर रहे हों उसके लिए export करने का एक तेज़, निजी, browser-आधारित studio। आधुनिक design में gradients हर जगह हैं: hero backgrounds, buttons, cards, glassmorphism panels, text effects, charts और mobile UIs। पर gradient CSS हाथ से लिखना झंझट है — angle convention याद रखना, colour stops व उनके percentages संभालना, और फिर पूरी चीज़ SCSS, Tailwind, React, Flutter या SwiftUI के लिए दोबारा लिखना। यह टूल आपको एक बार, विज़ुअली, design करने देता है और उन सभी targets के लिए सही, paste करने को तैयार code देता है, live preview के साथ ताकि आप ठीक वही देखें जो आप ship करेंगे।

यह CSS के हर gradient type को support करता है। Linear gradients उस angle पर चलती हैं जिसे आप slider, numeric input या आठ direction presets (top, bottom, left, right और चार कोने) में से एक से नियंत्रित करते हैं। Radial gradients एक बिंदु से फैलती हैं, circle या ellipse shape और नौ positions के विकल्प के साथ। Conic gradients एक केंद्र के चारों ओर घूमती हैं — pie-chart लुक, colour wheels व loading spinners के लिए बढ़िया। इन सभी का एक repeating संस्करण भी है, एक checkbox से toggle, stripes, rays व patterns के लिए। आप असीमित colour stops जोड़ सकते हैं, और हर stop के लिए colour चुन सकते हैं, उसकी opacity (alpha) सेट कर सकते हैं और position 0% से 100% तक खींच सकते हैं; stops को duplicate, delete, reverse, या एक random generator से बदला जा सकता है जो शोर के बजाय सुरुचिपूर्ण combinations बनाता है।

Live preview सिर्फ़ एक सपाट swatch से ज़्यादा है। आप gradient को full background, rounded card, button, circle, gradient-clipped text, या gradient border के रूप में देख सकते हैं — ताकि commit करने से पहले judge कर सकें कि यह context में कैसा दिखेगा। चूँकि असल projects कई colour syntaxes इस्तेमाल करते हैं, output stop colours को HEX, RGB, RGBA, HSL या HSLA के रूप में render कर सकता है, और code panel आपकी gradient को plain CSS, vendor prefixes वाली CSS, CSS custom properties, SCSS, LESS, Tailwind, React, Vue, Angular, Flutter, SwiftUI, Android XML, या SVG के रूप में बना सकता है। एक dropdown इन सबके बीच बदलता है।

code से आगे, टूल assets export करता है। आप gradient को उच्च-resolution पर canvas पर render करके PNG image, standalone SVG, CSS snippet, या पूरे design को capture करने वाली JSON file के रूप में download कर सकते हैं ताकि बाद में फिर से import कर सकें। नब्बे से ज़्यादा hand-picked gradients की एक built-in preset library — Sunset, Ocean, Fire, Forest, Rainbow, Purple, Pastel, Glass, Gold व Neon categories में — एक क्लिक में एक professional शुरुआत देती है, जिसे आप फिर बदल सकते हैं। एक favorites सिस्टम आपकी अपनी gradients को browser में सहेजता है, और एक import box आपको कोई भी मौजूदा gradient CSS (या JSON) paste करके उसे विज़ुअली edit करने देता है।

सुलभ (accessible) design के लिए, एक contrast panel आपकी gradient पर सफ़ेद व काले text की WCAG contrast ratio का अनुमान लगाता है, ताकि आप एक नज़र में बता सकें कि ऊपर रखा caption या button label पढ़ने-योग्य होगा या नहीं। पूरा टूल हल्का और तुरंत होने के लिए बनाया गया है: gradients native CSS से render होती हैं (कोई भारी library नहीं), DOM updates न्यूनतम हैं, और slider खींचते ही सब कुछ live प्रतिक्रिया देता है। यह पूरी तरह responsive है, phone पर उतना ही अच्छा जितना wide desktop पर, और पूरी तरह निजी है — आपका बनाया कोई colour, gradient या design कभी server पर upload नहीं होता, कोई sign-up नहीं, और load होने के बाद यह offline काम करता है।

यह किसके लिए है? frontend व web developers जिन्हें frameworks के पार production-ready gradient code चाहिए; colour व mood खोजते UI/UX designers; mobile developers जो वही gradient Flutter, SwiftUI या Android में चाहते हैं; CSS gradients व colour सीखते students; और वे सभी जो कोई भारी design app खोले बिना एक सुंदर background, button या hero चाहते हैं। चाहे आप किसी preset से शुरू करें, मौजूदा CSS paste करें, या stop-दर-stop बनाएँ — यह designer gradient काम को झंझट भरे अंदाज़े से एक तेज़, विज़ुअल, कहीं-भी-export वाले workflow में बदल देता है।


🌈 Gradient Types & Examples

  • Linear: linear-gradient(90deg, #7C5CFC 0%, #a855f7 100%) — colour runs along an angle.
  • Radial: radial-gradient(circle at center, #fff 0%, #000 100%) — colour radiates from a point.
  • Conic: conic-gradient(from 0deg at center, red, yellow, green, red) — colour sweeps around a centre.
  • Repeating: add repeating- for stripes and rays, e.g. repeating-linear-gradient(45deg, #000 0 10px, #fff 10px 20px).

💡 Best practices

  • Keep gradients subtle for large backgrounds; strong contrast between stops can distract from content.
  • Check text contrast — use the contrast panel and prefer a solid overlay behind small text.
  • Use 2–3 stops for most UI; more stops suit decorative or artistic backgrounds.
  • For buttons, a slight vertical or diagonal linear gradient reads as a physical surface.
  • Remember the angle convention: 0deg points up, 90deg right, 180deg down, 270deg left.

🌐 Browser compatibility

Linear and radial gradients work in every modern browser (Chrome, Firefox, Safari, Edge, Opera) and have done for years. Conic gradients and 8-digit hex with alpha are supported in all current browsers; for very old ones, use RGBA output and add the vendor-prefixed CSS option. The tool itself uses only standard web APIs and needs no plugins.

🔒 Privacy

This designer is 100% client-side. Every gradient you build is rendered by CSS and JavaScript in your own browser — nothing is sent to any server, there is no account, and your favorites are stored only in your browser's local storage. Clear them anytime; once loaded, the tool works with no internet connection.

🚀 How to use

  1. Pick a type (linear, radial, conic) and optionally repeating; set the angle or direction.
  2. Add and adjust colour stops — colour, opacity and position — or start from a preset.
  3. Preview on a card, button, text and choose the colour format.
  4. Select an output format and copy the code, or download PNG/SVG/CSS/JSON.
  5. Save it to favorites, or paste existing CSS into Import to edit visually.

❓ Frequently Asked Questions


🛠️ Troubleshooting

  • Gradient direction looks wrong: CSS angles start at the top — 0deg points up, 90deg right. Use the direction presets if you think in top/bottom/left/right.
  • Conic gradient not showing: Update to a current browser; conic gradients need a modern engine. Linear/radial always work.
  • Alpha not visible in HEX: 8-digit hex encodes alpha; switch the colour format to RGBA/HSLA if a target does not support it.
  • Imported CSS didn't parse: The importer reads standard linear/radial/conic-gradient(...) with hex or rgb stops; unusual syntax may need manual entry.
  • PNG looks slightly different from CSS: The PNG is rendered on a canvas and approximates the angle; for pixel-perfect output use the SVG or CSS.
  • Favorites disappeared: Favorites live only in your browser; clearing browser data or private mode will not retain them.
  • Repeating gradient is a solid colour: Repeating needs stop positions that leave room to repeat — give stops distinct, smaller percentages.