@motion-script/core / colorProperty
Variable: colorProperty
constcolorProperty: (opts?) => (target,propertyKey) =>void
Defined in: attributes/properties/typed.ts:142
A tweenable colour property: parses CSS strings, oklch(), theme tokens and
"white/10" alpha suffixes, and interpolates in normalized space.
The stored value is a NormalizedColor (a [r, g, b, a] tuple), which
is not a FillProp on its own — hand it to a fill rather than painting it
directly: g.fill(Fills.color(this.tint)) or g.fill({ type: 'solid', color: this.tint }). For a property that is itself a paint layer, use
fillProperty.
Parameters
opts?
AttributePropOptions<Color, NormalizedColor>
Returns
(target, propertyKey) => void