Function: generateGradient()
ts
function generateGradient(
from,
to,
steps): string[];Generates an array of steps hex colors interpolated between from and to as a gradient.
Parameters
| Parameter | Type |
|---|---|
from | string |
to | string |
steps | number |
Returns
string[]
Example
ts
generateGradient('#000000', '#ffffff', 3) // => ['#000000', '#7f7f7f', '#ffffff']Since
1.0.0