Table of Contents

Method SampleEvenly

Namespace
Gamelogic.Colors
Assembly
Gamelogic.Colors.dll

SampleEvenly(GradientHSL, int, float)

Returns a list of colors sampled evenly across the gradient.

public static IEnumerable<ColorHSL> SampleEvenly(this GradientHSL gradient, int colorCount, float jitter)

Parameters

gradient GradientHSL

The gradient to sample

colorCount int

The number of colors to return

jitter float

The 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<ColorHSL>