Skip to content
GitHub repository
Class

Gradient

Base class of all gradients. Stops are interpolated premultiplied (OKLab by default), baked into a shared half-float atlas and dithered when sampled, so gradients stay smooth without banding.

Extended by#

Constructors#

Constructor#

new Gradient(options: GradientOptions): Gradient;

Parameters#

ParameterType
optionsGradientOptions

Returns#

Gradient

Properties#

PropertyModifierTypeDescriptionDefined in
easingreadonlyEasingHow the ramp moves between stops.gradient.ts:138
extendreadonlyExtendModeWhat the gradient does outside 0..1.gradient.ts:140
spacereadonlyColorSpaceInterpolation space.gradient.ts:136
unitsreadonlyGradientUnitsCoordinates of the gradient’s points and radii.gradient.ts:142