Favorites

conic-gradient() CSS Function

conic-gradient()
CSS FunctionThis function is supported by all modern browsers.
Updated 31st December 2025

The conic-gradient() function creates an image of colors that change around a center point, like a color wheel or pie chart.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

Description

The conic-gradient() CSS function creates a gradient that is rotated around a central point, producing a conical or pie-like effect. Unlike linear or radial gradients, where color transitions follow a straight line or radiate outward in a circle, conic-gradient() transitions colors around an angle, starting from a specified point, typically the center of the element. This allows designers to simulate effects like pie charts, color wheels, or circular progress indicators with smooth, angular color blending.

Colors in conic-gradient() can be defined with stops at specific angles, letting you control where each color starts and ends. By default, the gradient begins at the top of the circle (12 o’clock position), but you can rotate it using a starting angle. You can also specify the central point of the gradient, which accepts values similar to position coordinates (e.g., center, top left, or exact lengths/percentages).

For example, you could create a simple color wheel effect:

div {
  width: 200px;
  height: 200px;
  background: conic-gradient(red, yellow, green, blue, red);
  border-radius: 50%;
}

This will generate a circular element where colors transition smoothly around the center.

conic-gradient() is often combined with radial-gradient() or linear-gradient() for more complex layered backgrounds. Additionally, you can animate it by changing the starting angle over time to create rotating effects or dynamic pie charts.

The function is widely supported in modern browsers and provides a powerful tool for creating circular and angular visual effects purely with CSS, without relying on images or SVGs.

Interactive Demo

Demo Code
HTML Code
<div class="demo-element"></div>
CSS Code
.demo-element {
	width: 200px;
	height: 170px;
	border-radius: 8px;
	background: conic-gradient(#f72585, #ffd166, #4361ee, #f72585);
}

Syntax

conic-gradient() =  conic-gradient([from angle] [at position,] color degree, color degree, ...);

Values

  • from angleThe entire conic gradient is rotated by this angle. Default value is 0deg. Optional.
  • at positionSpecifies the gradient center of the conic gradient. Default value is center. Optional.
  • color degreeColor stops are the colors you want to render smooth transitions among. This value consists of a color value, followed by an optional stop position (a degree between 0 and 360 or a percent between 0% and 100%).

Example

<div class="conic-container"></div>
.conic-container {
width: 300px;
height: 300px;
border-radius: 50%;

/* The syntax: conic-gradient([from angle] [at position], color-stop1, color-stop2, ...)
*/
background: conic-gradient(
#ffadad,
#ffd6a5,
#fdffb6,
#caffbf,
#9bfbc0,
#a0c4ff,
#bdb2ff,
#ffc6ff,
#ffadad
);

/* Optional: Adds a bit of depth */
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
Open in editor

Browser Support

The following information will show you the current browser support for the CSS conic-gradient() function. Hover over a browser icon to see the version that first introduced support for this CSS function.

This function is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.