Skip to the content

Conic Gradient Generator

Make a CSS conic gradient for a color wheel, a pie chart or a spinner: set the start angle and the colors and copy the code.

°
%
%
Color stops

Drag a handle to move a stop. Click the bar to add one.

Presets

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

How conic-gradient() is written

This is the gradient the page opens with. Its code is read from left to right:

background: conic-gradient(from 45deg, #7c3aed, #06b6d4, #7c3aed);
In the codeWhat it does
from 45degWhere the gradient starts. 0deg points straight up and angles turn clockwise, so this one starts halfway between twelve and three o'clock. Without it the gradient starts at the top.
#7c3aedThe first color, on the starting line.
#06b6d4The second color. Stops without a position are spread evenly over the full turn, so it sits halfway round, opposite the start.
#7c3aedThe first color once more, at the end of the turn. The reason is given below.

Positions in a conic gradient go round, not outwards. They can be percentages of a full turn or angles: 25% and 90deg are the same place, a quarter turn on from the start.

The center can be moved with at, the same way as in a radial gradient: from 45deg at 30% 70%.

The seam

A conic gradient ends where it began, so its last color lies right next to its first. If the two differ, there is a hard line along the starting angle: conic-gradient(#7c3aed, #06b6d4) shows it as a sharp edge pointing straight up.

Repeat the first color at the end, as in the code above, and the line is gone. The Random button does this for conic gradients.

For a pie chart the hard lines are the point. There every slice is one color with two positions, such as #06b6d4 40% 70%.

Color stops, hard edges for stripes and fading to transparent work the same in every kind of gradient. They are explained on the CSS gradient generator page.

See all 8