Method SampleEvenly
SampleEvenly(Gradient, int, float)
Returns a list of colors sampled evenly across the gradient.
public static IEnumerable<Color> SampleEvenly(this Gradient gradient, int colorCount, float jitter)
Parameters
gradient
GradientThe gradient to sample
colorCount
intThe number of colors to return
jitter
floatThe amount of jitter. This value should be between 0 and 1, and represents the extent of a random offset of the sampled colors. For good results the jitter should be less than half the distance between samples, that is, less than 1/(2*(colorCount - 1)).
Returns
SampleEvenly<TColor>(Gradient<TColor>, int, float)
Returns a list of colors sampled evenly across the gradient.
[Version(2, 1, 0)]
public static IEnumerable<TColor> SampleEvenly<TColor>(this Gradient<TColor> gradient, int colorCount, float jitter)
Parameters
gradient
Gradient<TColor>The gradient to sample
colorCount
intThe number of colors to return
jitter
floatThe amount of jitter. This value should be between 0 and 1, and represents the extent of a random offset of the sampled colors. For good results the jitter should be less than half the distance between samples, that is, less than 1/(2*(colorCount - 1)).
Returns
- IEnumerable<TColor>
Type Parameters
TColor