Radial Gradient Generator

Create stunning circular and elliptical CSS gradients. Perfect for spotlight effects, glowing buttons, vignettes, and backgrounds with radial depth. Full control over shape, position, and colors.

🎨 Live Preview

⚙️ Radial Gradient Controls

Understanding Radial Gradients in CSS

While linear gradients transition colors along a straight line, radial gradients radiate outward from a central point, creating circular or elliptical color transitions. This fundamental difference makes radial gradients perfect for entirely different design applications—spotlight effects that draw attention, glowing buttons that suggest interactivity, vignette effects that focus images, background patterns with depth and dimension, and any design element where you want to create emphasis radiating from a central focal point.

Radial gradients are incredibly versatile in modern web design. They create natural-looking lighting effects that simulate real-world illumination, add depth to flat interfaces, generate soft shadows and glows, and produce eye-catching focal points. Major websites use radial gradients for hero section backgrounds, interactive button states, image overlays, and decorative elements that add sophistication without overwhelming content.

The mathematical elegance of radial gradients makes them particularly effective for creating professional designs. Unlike linear gradients that require careful angle consideration, radial gradients automatically center attention, creating natural visual hierarchy. Your eye is naturally drawn to the center of a radial gradient, making them excellent for call-to-action buttons, featured content, and any element where you want to guide user attention.

CSS radial gradients offer extensive control through shape selection (circle or ellipse), position keywords and custom coordinates, multiple color stops with precise positioning, and extent keywords that control gradient size. Our generator provides an intuitive interface to all these powerful options, letting you create professional radial gradients without memorizing complex syntax.

How to Use Our Radial Gradient Generator

Creating beautiful radial gradients is straightforward with our interactive tool:

Step 1: Choose Your Gradient Shape

Select between circle and ellipse. Circle creates a perfectly round gradient regardless of container dimensions—ideal for circular buttons, icons, or geometric designs. Ellipse stretches to match the container's aspect ratio, making it better for full-width backgrounds, rectangular cards, and responsive designs that adapt to different screen sizes.

Step 2: Set the Gradient Position

Choose where your gradient radiates from using the position dropdown. Center (default) creates balanced, symmetrical effects. Corner positions (like top left or bottom right) create dramatic, directional lighting effects. Edge positions (top, right, bottom, left) produce asymmetrical gradients perfect for creating depth and visual interest.

Step 3: Configure Your Colors

Start with two default colors and use the color pickers to customize them. The first color appears at the gradient's center, transitioning outward to subsequent colors. Click "Add Color" to introduce additional color stops for complex, multi-tone effects. Each color stop creates a new transition zone, allowing sophisticated color progressions.

Step 4: Copy and Implement

Click "Copy CSS" to instantly copy the production-ready code to your clipboard. Paste it into your stylesheet and apply it to any element. The generated code works across all modern browsers without modification. The live preview shows exactly what you'll get in production.

Radial Gradient Syntax Explained

Understanding the syntax helps you customize gradients beyond what the generator provides and debug issues when they arise.

Basic Syntax Structure

The radial-gradient() function follows this pattern:

background: radial-gradient(shape at position, color1, color2, ...);

For example:

background: radial-gradient(circle at center, #667eea, #764ba2);

This creates a circular gradient centered in the element, transitioning from blue-purple at the center to darker purple at the edges.

Shape Values

CSS provides two shape options:

Position Keywords and Values

Position determines the gradient's starting point (its center). You can use:

Keywords:

Percentage or length values:

radial-gradient(circle at 30% 40%, #667eea, #764ba2)

This positions the center at 30% from the left edge and 40% from the top edge.

Color Stops with Positioning

Like linear gradients, you can control where colors begin and end:

background: radial-gradient(circle at center,
    #667eea 0%,
    #764ba2 50%,
    #f093fb 100%
);

Color stops are measured from the gradient's center outward. 0% is the exact center, 100% is the edge (determined by the extent keyword or natural ending point).

Extent Keywords (Advanced)

Extent keywords control how far the gradient extends:

Example:

background: radial-gradient(circle closest-side at center, #667eea, #764ba2);

Practical Design Applications

Radial gradients excel in specific design contexts where linear gradients would feel awkward or ineffective:

1. Spotlight and Hero Effects

Create dramatic spotlight effects for hero sections by using a radial gradient from light/bright at center to dark at edges. This naturally draws attention to central content like headlines, calls-to-action, or featured images. Position the gradient slightly off-center for dynamic, asymmetrical effects.

background: radial-gradient(ellipse at 30% 30%, 
    rgba(102, 126, 234, 0.4) 0%, 
    rgba(0, 0, 0, 0.9) 100%
);

2. Glowing Buttons

Add depth and interactivity to buttons with subtle radial gradients that simulate lighting from above or create glowing effects:

.button {
    background: radial-gradient(ellipse at top, #7d8ef5, #667eea);
    transition: all 0.3s;
}

.button:hover {
    background: radial-gradient(ellipse at top, #8fa0ff, #7788ee);
}

3. Vignette Effects

Create professional vignette effects for image galleries or hero images using radial gradients from transparent center to semi-transparent dark edges:

.vignette {
    position: relative;
}

.vignette::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, 
        transparent 0%, 
        transparent 50%, 
        rgba(0, 0, 0, 0.7) 100%
    );
}

4. Soft Backgrounds with Depth

Use subtle radial gradients to add depth to card backgrounds, modal overlays, or page backgrounds without harsh edges:

background: radial-gradient(ellipse at top left, 
    #f7f7f9, 
    #ffffff
);

5. Loading and Progress Indicators

Radial gradients create effective loading animations and progress indicators. Combined with CSS animations, they produce smooth, professional loading states.

6. Icon and Logo Enhancements

Apply radial gradients to SVG icons or logo elements to create dimension and sophistication. The radial nature mimics natural lighting, making flat icons appear three-dimensional.

Combining Multiple Radial Gradients

One of CSS's most powerful features is the ability to layer multiple backgrounds. Combine several radial gradients to create complex, unique effects:

background: 
    radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.3), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.3), transparent 50%),
    #1a1a1a;

This creates multiple light sources on a dark background, perfect for modern, sophisticated interfaces. Each gradient acts as a separate layer, with the first in the list appearing on top.

Radial Gradients vs. Linear Gradients: When to Use Which

Choosing between radial and linear gradients depends on your design goals:

Use Radial Gradients When:

Use Linear Gradients When:

Don't feel constrained to one or the other—combining radial and linear gradients often produces the most sophisticated results. Layer them using multiple backgrounds for unique, professional effects.

Performance and Browser Considerations

Radial gradients are highly performant, rendered by the browser's GPU just like linear gradients. However, a few considerations ensure optimal performance:

Keep Color Stops Reasonable

While you can add many color stops, 2-5 stops usually provide the best balance between visual complexity and rendering performance. Extremely complex gradients with dozens of stops can have minor performance impacts on older devices.

Use Percentage Values for Responsiveness

When positioning gradients, percentage values adapt better to different screen sizes than fixed pixel values. This ensures your gradient looks good on both mobile and desktop.

Provide Fallback Colors

Always include a solid background color as a fallback for the extremely rare case of unsupported browsers:

background: #667eea; /* Fallback */
background: radial-gradient(circle at center, #667eea, #764ba2);

Test Across Devices

Radial gradients can appear slightly different on various displays due to color calibration. Test on multiple devices to ensure consistent quality, especially if precise color matching is critical.

Advanced Techniques: Repeating Radial Gradients

CSS also provides repeating-radial-gradient() for creating patterns:

background: repeating-radial-gradient(circle at center,
    #667eea 0px,
    #667eea 10px,
    #764ba2 10px,
    #764ba2 20px
);

This creates concentric circles of alternating colors—perfect for decorative backgrounds, loading animations, or geometric patterns. While less common than standard radial gradients, repeating radial gradients offer unique design possibilities.

Accessibility Considerations

When using radial gradients, especially for backgrounds behind text, ensure adequate contrast:

Test Contrast at All Points

Because radial gradients transition from center to edge, contrast varies across the gradient. If you're placing text over a radial gradient, verify that text remains readable at all points of the transition. Use browser developer tools or contrast checkers to verify WCAG compliance.

Consider Using Overlays

For text-heavy sections over radial gradients, add a semi-transparent overlay between the gradient and text to ensure consistent readability:

.text-container {
    position: relative;
    background: radial-gradient(ellipse at center, #667eea, #764ba2);
}

.text-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
}

Design Inspiration and Resources

For comprehensive technical documentation on radial gradients, including detailed syntax references and browser compatibility information, visit the MDN Web Docs guide to radial-gradient(). This authoritative resource provides in-depth information for developers at all skill levels.

Explore our other gradient tools for complete design flexibility: use our Linear Gradient Generator for directional effects, browse our Gradient Palette for pre-made inspiration, or try our Mesh Gradient Generator for cutting-edge, complex effects.

Frequently Asked Questions

What is a radial gradient and how is it different from linear gradients?
A radial gradient radiates outward from a central point in a circular or elliptical pattern, whereas linear gradients transition along a straight line. Radial gradients are perfect for spotlight effects, circular buttons, backgrounds with depth, and any design where you want to draw attention to a central focal point.
When should I use a circle vs. an ellipse shape?
Use circle shape when you want a perfectly round gradient that maintains its circular appearance regardless of container dimensions. Use ellipse when you want the gradient to stretch to match the container's width and height, which is often better for backgrounds and full-width elements.
What are the position keywords in radial gradients?
Position keywords determine where the gradient's center point is located. Options include 'center' (default), 'top', 'bottom', 'left', 'right', and combinations like 'top left' or 'bottom right'. You can also use percentage values or pixel measurements for precise positioning.
How do I create a spotlight effect with radial gradients?
Create a spotlight by using a radial gradient from a bright or transparent center to a darker outer color. For example: radial-gradient(circle at center, rgba(255,255,255,0.3), transparent 70%, rgba(0,0,0,0.8)). Position the gradient where you want the spotlight to appear.
Can I combine radial and linear gradients?
Yes! CSS allows multiple backgrounds, so you can layer radial and linear gradients. Separate them with commas in the background property. This technique creates complex, sophisticated effects perfect for modern web designs. The first gradient in the list appears on top.
What's the difference between 'closest-side' and 'farthest-corner'?
These are extent keywords that control gradient size. 'closest-side' makes the gradient end at the nearest edge, creating a contained effect. 'farthest-corner' extends to the farthest corner, ensuring full coverage. These offer precise control for specific design needs.
How do I create a vignette effect for images?
Create a vignette by applying a radial gradient overlay from transparent at center to semi-transparent black at edges: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.8) 100%). This draws focus to the center of images.
Are radial gradients supported in all browsers?
Yes, radial gradients are supported in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. Browser support exceeds 97% globally. Very old browsers may need fallback solid colors, but modern browser support is excellent.
How do I create a glowing button effect?
Layer multiple radial gradients with the same center point but different sizes and opacities. Start with a bright, small gradient at center, then add larger, more transparent gradients radiating outward. Combine with box-shadow for enhanced glowing effects.
Can I animate radial gradients?
Direct gradient animation isn't supported in CSS, but you can animate gradient-like effects by changing opacity of layered elements, animating background-position on larger gradients, or using CSS custom properties with JavaScript. Pseudo-elements with opacity transitions also create effective animated effects.

Usage Disclaimer

Explore our complete gradient toolkit: Linear Gradient Generator for directional effects, Gradient Palette for pre-made inspiration, and Mesh Gradient Generator for advanced effects.

CSS copied to clipboard!