Uitly Logo
UITLY
Uitly Free CSS Gradient Generator

Free CSS Gradient Generator — Linear, Radial, Conic & Tailwind

Uitly CSS Gradient Generator is a free online tool that creates linear, radial, and conic CSS gradients with live preview. Supports up to 8 color stops with position control, angle slider with compass, 12 presets, and exports plain CSS, Tailwind classes, and CSS custom properties. No signup required.

Uitly's CSS gradient generator creates production-ready linear, radial, and conic gradients with live preview. Add up to 8 color stops, control the angle and position of each stop, choose from 12 designer presets, and export in plain CSS or Tailwind format instantly. No signup. No cost.

Every gradient you create runs entirely in your browser with no server processing and no file size impact on your project. CSS gradients replace background images, which means no network requests, no pixelation at any resolution, and instant rendering.

LinearStraight line at any angle
RadialRadiates from center point
ConicRotates around center

Live Gradient Preview

See your gradient update in real time as you adjust colors, positions, angle, and type. No refresh needed and no lag between changes.

Plain CSS and Tailwind Export

Copy your gradient as a production-ready CSS background declaration or as a Tailwind className string with one click. Both formats include arbitrary hex values for exact color matching.

12 Curated Presets

Start from 12 designer-curated gradient presets covering linear, radial, and conic types. Apply any preset as a starting point and adjust from there.

Up to 8 Color Stops

Add up to 8 color stops to your gradient. Each stop has its own color picker, HEX input, and position slider so you control exactly where each transition happens.

CSS Custom Property Export

Export your gradient as a CSS custom property declaration. Reference the variable throughout your stylesheet so a future palette change only requires editing one line.

Linear, Radial, and Conic Types

Switch between all three CSS gradient types. Linear gradients flow in a line. Radial gradients radiate from a point. Conic gradients rotate around a center, perfect for pie charts and color wheels.

100% free, no limitsNo account or signup3 gradient typesUp to 8 color stopsCSS and Tailwind exportWorks on mobile and tablet
Scroll down to build your gradient

Build Your CSS Gradient

Pick your gradient type, add color stops, adjust the angle, and copy the output. The entire process takes under two minutes and requires no account.

CSS Gradient Generator
Linear, radial, and conic gradients with up to 8 stops and position control

Preview

Gradient Type

Colors flow in a straight line at the specified angle

Angle135°click compass to snap to 45° increments

Color Stops2 of 8 max

0%
0100
100%
0100

Presetshover to see name, click to apply

Plain CSS
css
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
Tailwind CSS
jsx
className="bg-gradient-to-br from-[#667eea] to-[#764ba2]"
CSS Custom Properties
css
:root {
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.my-element {
  background: var(--gradient);
}

How to Create a CSS Gradient Online

Five steps from an empty canvas to a copied gradient ready for production. No color theory expertise required.

  1. Choose a gradient type

    Select linear, radial, or conic. Linear gradients flow along a straight line. Radial gradients radiate from a central point. Conic gradients rotate around a center and work well for pie charts and color wheels.

  2. Set the angle for linear or conic gradients

    Use the angle slider to set a direction from 0 to 360 degrees. Click the compass to snap to the nearest 45-degree increment. Use the quick-angle buttons for common directions like 90, 135, and 180 degrees.

  3. Add color stops and set positions

    Click Add Stop to add up to 8 color stops. Use the color picker or enter a HEX code for each. Drag the position slider for each stop to control exactly where each color transition happens along the gradient.

  4. Apply a preset or randomize

    Click any of the 12 designer presets for a curated starting point. Use the Randomize button to generate a completely new gradient while keeping the current stop count and gradient type.

  5. Copy in your preferred format

    Click Copy CSS to get the plain CSS background declaration. Click Copy Tailwind for the className string. Click Copy CSS Variables to get a custom property declaration ready to paste into your root stylesheet.

Why Use the Uitly CSS Gradient Generator?

Many CSS gradient tools do the basics. Here is what makes this one worth using for real projects.

Position Control on Every Stop

Each color stop has its own position slider from 0 to 100%. This means you control not just which colors appear but exactly where each transition happens in the gradient, giving you precision that basic color pickers cannot match.

Three Export Formats in One Tool

Most gradient generators only output plain CSS. This tool also outputs Tailwind CSS class strings with arbitrary hex value syntax, and CSS custom property declarations for design token workflows.

All Three CSS Gradient Types

Linear, radial, and conic gradients are all supported in the same tool. Conic gradients are particularly rare in free tools and open up pie chart, color wheel, and starburst visual effects that neither linear nor radial can produce.

Aspect Ratio Preview Control

Switch the preview between 16:9, square, 4:3, and wide formats to see how your gradient looks across different container shapes before using it in a project.

Randomize Keeps the Structure

The randomize button changes colors while keeping the current number of stops and gradient type. This means you can explore color variations without rebuilding the stop structure from scratch every time.

Interactive Compass Navigation

The compass indicator is clickable. Click anywhere on its face to snap the angle to the nearest 45-degree increment for standard directions. The visual indicator always shows the current flow direction.

A Gradient Tool Built for Production, Not Just Demos

Most CSS gradient generators produce a CSS string and stop there. They do not offer Tailwind output, do not support conic gradients, and do not let you control the position of individual color stops. This forces a second round of manual editing after copying the output.

This tool outputs three formats simultaneously: plain CSS, Tailwind class strings with arbitrary hex support, and CSS custom property declarations. It supports all three gradient types including conic, which most competitors do not cover. The per-stop position control means what you see in the preview is exactly what renders in your project without any post-copy adjustments.

What Are CSS Gradients and Why Use Them?

CSS gradients are a type of CSS image that creates a smooth, programmatic transition between two or more colors entirely in code. The browser renders them natively without any PNG, SVG, or JavaScript required. Because they are pure CSS, they scale perfectly to any resolution, load instantly with no network request, and respond to container size changes without any layout recalculation.

The CSS background property accepts gradient functions directly as its value. You use gradients everywhere you would use a background image: hero sections, buttons, cards, overlays, text fills via background-clip, and decorative borders. Every modern web application from Google to Stripe uses gradients to add depth, visual hierarchy, and brand character without adding a single image file to the page.

CSS supports three gradient types: linear, radial, and conic. Each serves a fundamentally different visual purpose. Choosing the right type for the situation is one of the most impactful decisions in gradient design.

Linear, Radial, and Conic: When to Use Each

Each CSS gradient type creates a fundamentally different visual effect. Here is what each one does, where it excels, and how to write the code.

linear-gradient()Most common. Best for backgrounds, banners, and buttons.

A linear gradient creates a smooth color transition along a straight line at a specified angle. The angle argument controls the direction: 0 degrees flows from bottom to top, 90 degrees flows from left to right, and 135 degrees flows diagonally from top-left to bottom-right. Most modern landing page hero sections use angles between 120 and 150 degrees because the diagonal movement feels contemporary and energetic.

Best for

Hero sections, full-page backgrounds, button fills, card headers, horizontal dividers

CSS
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
radial-gradient()Spotlight effects. Best for icons, glows, and circular elements.

A radial gradient creates a transition that radiates outward from a central point in a circular or elliptical pattern. The circle keyword creates a uniform spread in all directions. The ellipse keyword stretches the gradient to fill the element's bounding box proportionally. Radial gradients create a sense of depth and luminosity that linear gradients cannot replicate, making them ideal for UI elements that need to appear glowing or illuminated from behind.

Best for

Spotlight effects, icon backgrounds, glowing buttons, circular decorative elements, product highlights

CSS
background: radial-gradient(circle at center, #f7971e 0%, #ffd200 100%);
conic-gradient()Rotational. Best for pie charts, color wheels, and clock faces.

A conic gradient creates color transitions that rotate around a center point, similar to the face of a clock or a color wheel. Unlike linear and radial gradients, color transitions in a conic gradient follow the perimeter of a circle rather than a straight line or expanding radius. The from keyword sets the starting angle of the rotation. Conic gradients became widely supported in modern browsers around 2020 and remain underused despite their unique visual possibilities.

Best for

Pie charts, donut charts, color wheels, starburst backgrounds, circular progress indicators

CSS
background: conic-gradient(from 0deg, #ff6b6b 0%, #ffd93d 25%, #6bcb77 50%, #4d96ff 75%, #ff6b6b 100%);

Using CSS Gradients in Tailwind CSS

Tailwind CSS 3 ships with a built-in gradient system using three utility classes: from, via, and to. The direction comes from bg-gradient-to-direction utilities. For custom hex colors and gradient types not covered by Tailwind's built-in utilities, Tailwind 3's JIT compiler supports arbitrary values in square brackets.

Two-color linear gradient

<div className="bg-gradient-to-r from-[#667eea] to-[#764ba2]">

Use from and to utilities with arbitrary hex values for exact color matching.

Three-color with midpoint

<div className="bg-gradient-to-br from-[#a18cd1] via-[#fbc2eb] to-[#a1c4fd]">

The via utility sets the midpoint color. Only one via stop is supported natively.

Radial gradient via JIT

<div className="bg-[radial-gradient(circle,#f7971e,#ffd200)]">

Tailwind does not have built-in radial utilities. Use an arbitrary value in square brackets with Tailwind 3 JIT.

Conic gradient via JIT

<div className="bg-[conic-gradient(from_0deg,#ff6b6b,#ffd93d,#6bcb77,#4d96ff)]">

Replace spaces with underscores inside arbitrary value brackets so Tailwind's JIT parser handles them correctly.

Direction utilities reference

bg-gradient-to-t    /* bottom to top (0deg)     */
bg-gradient-to-tr   /* bottom-left to top-right */
bg-gradient-to-r    /* left to right (90deg)    */
bg-gradient-to-br   /* top-left to bottom-right */
bg-gradient-to-b    /* top to bottom (180deg)   */

These are the 8 direction utilities built into Tailwind. For any other angle, use an arbitrary value.

CSS Gradient Design Tips for Better Results

Technical correctness is not the same as visual quality. These practical tips come from real gradient usage across hundreds of design projects.

Keep the hue shift under 60 degrees

The most visually appealing gradients transition between colors that share a close relationship on the color wheel. A hue shift greater than 90 degrees often produces a muddy, desaturated midpoint. Pair colors that sit between 30 and 60 degrees apart for a smooth, professional result.

Use 135 degrees for modern layouts

The diagonal direction feels contemporary and energetic without being as stark as a purely horizontal or vertical flow. The majority of well-designed SaaS landing pages use angles between 120 and 150 degrees for hero section backgrounds.

Orient dark to light for text legibility

When placing text on a gradient background, position the darkest area behind your headline. This gives maximum contrast at the most important content and means you can avoid adding a text-shadow in most cases.

Add a lighter midpoint stop for depth

A three-stop gradient with a slightly lighter or more saturated color in the middle creates a sense of luminosity, as if light is hitting the surface from above. The Aurora preset in the generator demonstrates this effect clearly.

Reduce saturation for UI components

High-saturation gradients work well for illustration and hero imagery where visual energy is the goal. For buttons, cards, and form elements, reduce saturation by 20 to 30 percent so the gradient feels polished rather than flashy.

Test at multiple container widths

Linear gradients at shallow angles such as 10 to 20 degrees look significantly different on a narrow mobile screen than on a wide desktop, because the visual transition distance changes with the container width. Preview at small widths before committing to shallow-angle gradients.

Who Uses the Uitly CSS Gradient Generator?

Gradient decisions come up at every stage of a web project. Here is who gets the most value.

Frontend Developers

Generate gradient CSS without memorising the syntax for each gradient type. The three export formats cover plain CSS, Tailwind, and CSS variables so the output fits any project architecture without reformatting.

UI Designers

Explore gradient options visually with live preview and preset inspiration. The aspect ratio selector shows how the gradient looks in different container shapes before applying it to a design file.

No-Code Builders

Copy a CSS background string and paste it directly into a custom CSS field in Webflow, Framer, or any platform that accepts CSS. No code knowledge required beyond knowing where to paste.

Tailwind CSS Users

Get the exact className string including arbitrary hex values and JIT syntax for radial and conic gradients. No manual translation from CSS to Tailwind utilities required.

Content and Marketing Teams

Create on-brand gradient backgrounds for landing pages, email banners, and social media graphics without requesting developer time. The randomize button produces new options instantly from any starting point.

Frequently Asked Questions

Common questions about CSS gradient types, Tailwind usage, performance, and how the tool works.

A linear gradient creates a smooth color transition along a straight line at a specified angle. Colors flow from one side of the element to the other. A radial gradient creates a transition that radiates outward from a central point in a circular or elliptical pattern. Use linear gradients for backgrounds and banners. Use radial gradients for spotlight effects, glowing buttons, and circular decorative elements.

Click the Add Color button in the gradient tool to add additional color stops. The Uitly CSS Gradient Generator supports up to 8 stops. Each stop has its own color picker and position slider so you can control exactly where each transition happens. In code, multiple stops are written as comma-separated values inside the gradient function.

Tailwind uses bg-gradient-to-direction combined with from, via, and to utilities for linear gradients. For example: className equal to bg-gradient-to-r from-blue-500 to-purple-600. For exact hex colors, Tailwind 3 supports arbitrary values in square brackets. The Uitly gradient generator outputs the exact className string you need including arbitrary hex values for custom colors.

A conic gradient creates color transitions that rotate around a center point, like the face of a clock or a color wheel. Unlike linear and radial gradients which transition between colors across a straight line or from a point, conic gradients transition around the perimeter. They are useful for pie charts, color wheel displays, and decorative circular backgrounds.

CSS gradients have essentially zero impact on page load performance because they generate no network requests and have no file size. Browsers render them natively using GPU acceleration. Replacing a PNG or JPEG background with a CSS gradient typically saves between 50 and 500 KB per image and removes a render-blocking network request entirely.

Yes. The Uitly CSS Gradient Generator is completely free with no account, no signup, and no usage limits. The tool runs entirely in your browser, so no data is sent to a server.

You might also like

4 related tools