Method Choose
Choose(Gradient, IGenerator<float>)
Creates a color generator which generates colors from a gradient.
public static IGenerator<Color> Choose(this Gradient gradient, IGenerator<float> timeGenerator)
Parameters
gradient
GradientThe gradient from which colors are selected.
timeGenerator
IGenerator<float>The generator that determines where on the gradient the colors are selected. This generator should generate values between 0 and 1.
Returns
Choose(GradientHSL, IGenerator<float>)
Creates a color generator which generates colors from a HSL gradient.
[Obsolete("Use Choose(Gradient<ColorHSL>, IGenerator<float>) instead.")]
public static IGenerator<Color> Choose(this GradientHSL gradient, IGenerator<float> timeGenerator)
Parameters
gradient
GradientHSLThe gradient from which colors are selected.
timeGenerator
IGenerator<float>The generator that determines where on the gradient the colors are selected. This generator should generate values between 0 and 1.
Returns
Choose<TColor>(Gradient<TColor>, IGenerator<float>)
Creates a color generator which generates colors from a gradient.
[Version(2, 1, 0)]
public static IGenerator<TColor> Choose<TColor>(this Gradient<TColor> gradient, IGenerator<float> timeGenerator)
Parameters
gradient
Gradient<TColor>The gradient from which colors are selected.
timeGenerator
IGenerator<float>The generator that determines where on the gradient the colors are selected. This generator should generate values between 0 and 1.
Returns
- IGenerator<TColor>
Type Parameters
TColor