LinearGradient
Create smooth linear color gradients
Create smooth linear color gradients
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| colorA | color | #1aff00 | The starting color of the gradient |
| colorB | color | #0000ff | The ending color of the gradient |
| start | position | {"x":0,"y":0.5} | The starting point of the gradient |
| end | position | {"x":1,"y":0.5} | The ending point of the gradient |
| angle | range | 0 | Additional rotation angle of the gradient (in degrees) |
| edges | "stretch" | "transparent" | "mirror" | "wrap" | stretch | How to handle areas beyond the gradient endpoints |
| colorSpace | "linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch" | linear | Color space for color interpolation |
Usage
vue
<Shader>
<LinearGradient />
</Shader>