Random.RandomTones<T>

Extension Method in Random

Declaration

public static Color[] RandomTones<T>(this Color baseColor, int amount, float min = 0F, float max = 1F)
    where T : struct, IComponentModel

Description

Generates a given amount of random tones from the base color. The amount of change in the tones can be constrained between a minimum and maximum range if desired.

Type Parameters

TThe type of component model to use.

Parameters

baseColorThe base color to generate new colors from.
amountThe amount of random tones to generate.
minThe minimum amount of change in the tones [0..1] (default=0).
maxThe maximum amount of change in the tones [0..1] (default=1).

Returns

Color[]An array of random tones.