Four-colour pie chart
- Colours, one per line
- red yellow lime blue
- Colour edges
- Hard stops (pie)
- Start angle
- 0
- Centre, horizontal
- 50
- Centre, vertical
- 50
Result CSS: background: conic-gradient(red 0deg 90deg, yellow 90deg 180deg, lime 180deg 270deg, blue 270deg 360deg);
Colours: 4
Angle per colour: 90deg
Start angle: 0deg
Centre: 50% 50%
- Each colour gets 360 ÷ 4 = 90 degrees of the circle.
- Hard stops give every colour a start and end angle, so edges are sharp like pie slices.
- The sweep starts at 0deg (0 is straight up, turning clockwise) around 50% 50%.
Hard stops split the circle into four 90-degree slices, the usual way to draw a pie chart in pure CSS.