| offset | number | Yes | 0 | Proportion of the distance between the color stop and the start point to the total length. The value ranges from 0 to 1. |
| color | string | Yes | 'ffffff' | Gradient color to set. |
| offset | number | Yes | 0 | Proportion of the distance between the color stop and the start point to the total length. The value ranges from 0 to 1. |
| color | string | Yes | '#ffffff'| Gradient color to set. |
- Example
```
```ts
// xxx.ets
@Entry
@Component
structPage45{
...
...
@@ -37,9 +39,9 @@ Adds a color stop for the **CanvasGradient** object based on the specified offse