Gradients.ToGradientPalette
Extension Method in Gradients
Declaration
public static Color[] ToGradientPalette(this Color start, Color end, int stops)Description
Creates a palette of colors by interpolating a linear amount of stops between a start color and end color.
Parameters
| start | The start color of the gradient palette. |
| end | The end color of the gradient palette. |
| stops | The amount of stops to interpolate between the start and end color. |
Returns
| Color[] | The colors of the gradient palette. |
Overload
Declaration
public static Color[] ToGradientPalette(this Color start, Color end, float[] stops)Description
Creates a palette of colors by evaluating a predefined array of stops between a start color and end color. The number of colors generated is determined by the amount of stops.
Parameters
| start | The start color of the gradient palette. |
| end | The end color of the gradient palette. |
| stops | The array of stops to evaluate between the start and end color. |
Returns
| Color[] | The colors of the gradient palette. |