conic-gradient() CSS Function
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.
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
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
Tablets & Mobile
Last updated by CSSPortal on: 31st December 2025
