Skip to content

Commit 4899ab3

Browse files
committed
fix(examples): add hsl interpolation to color wheel and move from syntax to examples
1 parent 705a4c0 commit 4899ab3

1 file changed

Lines changed: 28 additions & 13 deletions

File tree

  • files/en-us/web/css/reference/values/gradient/conic-gradient

files/en-us/web/css/reference/values/gradient/conic-gradient/index.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,6 @@ conic-gradient(from 90deg at 0 0, blue, red)
7171
/* Interpolation in polar color space
7272
with longer hue interpolation method */
7373
conic-gradient(in hsl longer hue, red, blue, green, red)
74-
75-
/* Color wheel */
76-
conic-gradient(
77-
hsl(360 100% 50%),
78-
hsl(315 100% 50%),
79-
hsl(270 100% 50%),
80-
hsl(225 100% 50%),
81-
hsl(180 100% 50%),
82-
hsl(135 100% 50%),
83-
hsl(90 100% 50%),
84-
hsl(45 100% 50%),
85-
hsl(0 100% 50%)
86-
)
8774
```
8875

8976
### Values
@@ -311,6 +298,34 @@ The box on the left uses [shorter interpolation](/en-US/docs/Web/CSS/Reference/V
311298

312299
{{EmbedLiveSample("Interpolating with hue", 240, 200)}}
313300

301+
### Color Wheel
302+
303+
```html hidden
304+
<div></div>
305+
```
306+
307+
```css hidden
308+
div {
309+
width: 100px;
310+
height: 100px;
311+
border-radius: 50px;
312+
}
313+
```
314+
315+
```css
316+
div {
317+
background-image: conic-gradient(
318+
in hsl,
319+
hsl(360 100% 50%),
320+
hsl(240 100% 50%),
321+
hsl(120 100% 50%),
322+
hsl(0 100% 50%)
323+
);
324+
}
325+
```
326+
327+
{{EmbedLiveSample("Color Wheel", 100, 100)}}
328+
314329
### More conic-gradient examples
315330

316331
Please see [Using CSS gradients](/en-US/docs/Web/CSS/Guides/Images/Using_gradients) for more examples.

0 commit comments

Comments
 (0)