You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
::: details Details for the gradient configuration
51
+
52
+
#### `LinearGradient`
53
+
54
+
```jsonc
47
55
{
48
-
"type": "linear", // Type of gradient. Here, it's a linear gradient.
56
+
"type":"linear",
49
57
"x0":0, // x-coordinate of the starting point. Indicates the horizontal position where the gradient starts.
50
58
"y0":0, // y-coordinate of the starting point. Indicates the vertical position where the gradient starts.
51
59
"x1":0, // x-coordinate of the ending point. This is the horizontal position where the gradient ends. It’s the same as x0, meaning the gradient is vertical.
@@ -56,9 +64,13 @@ The color either in hexadecimal or as RGB array with red, green, and blue values
56
64
[1, "green"] // End color at position 1. The color at the end of the gradient (y = 256) is green.
57
65
]
58
66
}
67
+
```
68
+
69
+
#### `RadialGradient`
59
70
71
+
```jsonc
60
72
{
61
-
"type": "radial", // Type of gradient. Here, it's a radial gradient.
73
+
"type":"radial",
62
74
"x0":128, // x-coordinate of the starting circle's center. Specifies the horizontal position of the starting circle.
63
75
"y0":128, // y-coordinate of the starting circle's center. Specifies the vertical position of the starting circle.
64
76
"r0":0, // Radius of the starting circle. Here, it's 0, meaning the gradient starts at a single point.
@@ -71,5 +83,22 @@ The color either in hexadecimal or as RGB array with red, green, and blue values
71
83
[1, "white"] // Color at the edge of the gradient (r = 128). The color at the outer edge of the radial gradient is white.
72
84
]
73
85
}
86
+
```
87
+
88
+
#### `ConicGradient`
89
+
90
+
```jsonc
91
+
{
92
+
"type":"conic",
93
+
"x":0, // x-axis coordinate of the center of the gradient.
94
+
"y":0, // y-axis coordinate of the center of the gradient.
95
+
"startAngle":0, // The angle at which to begin the gradient, in radians. The angle starts from a line going horizontally right from the center, and proceeds clockwise.
96
+
"colorStops": [
97
+
[0, "red"], // Start color at position 0. The color at the beginning of the gradient is red.
98
+
[0.5, "yellow"], // Middle color at position 0.5. The color at the midpoint of the gradient (y = 128) is yellow.
99
+
[1, "green"] // End color at position 1. The color at the end of the gradient (y = 256) is green.
0 commit comments