void
void copied to clipboard
Consider a `gradient` trait
More complex than a single color, would give you a Figma-like gradient editor as the UI, and an array of stops with position
and color
properties, like:
[
{ position: 0, color: 'red' },
{ position: 0.5, color: 'blue' },
{ position: 1, color: 'yellow' }
]
Up to the user whether they want to use it for a linear, conical, radial, etc. type of gradient.
- https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient/addColorStop
- https://developer.mozilla.org/en-US/docs/Web/CSS/gradient
- https://www.figma.com/widget-docs/api/type-GradientPaint