Gradients.ToGradientPaletteNonAlloc
Extension Method in Gradients
Declaration
public static void ToGradientPaletteNonAlloc(this Color start, Color end, Color[] output)
Description
Creates a palette of colors by interpolating a linear amount of stops between a start color and end color. The number of colors generated is determined by the size of the array. The colors are stored in an existing array to prevent heap allocations.
Parameters
start | The start color of the gradient palette. |
end | The end color of the gradient palette. |
output | The output array to store the colors in. |
Overload
Declaration
public static void ToGradientPaletteNonAlloc(this Color start, Color end, float[] stops, Color[] output)
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. The colors are stored in an existing array to prevent heap allocations.
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. |
output | The output array to store the colors in. |