# ColorStops
Represents an array of color stops for gradients.

{/* Do not edit this file. It is automatically generated by API Documenter. */}

## ColorStops type

Represents an array of color stops for gradients.

**Signature:**

```typescript
type ColorStops = ReadonlyArray<{
  readonly color: Color;
  readonly offset: number;
  readonly opacity: number;
}>;
```

**References:** [Color](/en/creator-api/values/color)

## Example

```ts
// Red to blue gradient
const gradientStops: ColorStops = [
  { color: { r: 255, g: 0, b: 0 }, offset: 0, opacity: 1 },
  { color: { r: 0, g: 0, b: 255 }, offset: 1, opacity: 1 },
];
```
