Class: GradientPalette

GradientPalette(from, to, steps, easing)

new GradientPalette(from, to, steps, easing)

Create a gradient palette from an array of Color objects
Parameters:
Name Type Default Description
from Color starting color of the gradient
to Color ending color of the gradient
steps number number of steps in the gradient
easing EasingFunction | null null easing function to use for the interpolation. Defaults to null (linear)
Source:

Methods

(static) fromHEXColors(from_hex, to_hex, steps, easing) → {GradientPalette}

Create a gradient palette from HEX color strings
Parameters:
Name Type Default Description
from_hex string starting HEX color of the gradient
to_hex string ending HEX color of the gradient
steps number number of steps in the gradient
easing EasingFunction | null null easing function to use for the interpolation. Defaults to null (linear)
Source:
Returns:
gradient palette object
Type
GradientPalette

(static) fromRGBColors(from_rgb, to_rgb, steps, easing) → {GradientPalette}

Create a gradient palette from RGB color arrays
Parameters:
Name Type Default Description
from_rgb Array.<number> starting RGB color of the gradient
to_rgb Array.<number> ending RGB color of the gradient
steps number number of steps in the gradient
easing EasingFunction | null null easing function to use for the interpolation. Defaults to null (linear)
Source:
Returns:
gradient palette object
Type
GradientPalette