Random.RandomMonochromaticNonAlloc

Extension Method in Random

Declaration

public static void RandomMonochromaticNonAlloc(this Color baseColor, Color[] output, float spread = 0.5F, float min = -1F, float max = 1F)

Description

Creates a monochromatic harmony of the color, a set of tints and shades formed from the base color. The colors are stored in an existing array to prevent heap allocations. The amount of colors generated is determined by the size of the array.

Parameters

baseColorThe base color to create the harmony from.
outputThe output array to store the colors in.
spreadThe amount of change from the start to end [0..1] (default=0.5).
minThe minimum amount of change in the tints and shades [-1..1] (default=-1).
maxThe maximum amount of change in the tints and shades [-1..1] (default=1).