Random.RandomDesaturatedNonAlloc

Extension Method in Random

Declaration

public static void RandomDesaturatedNonAlloc(this Color baseColor, Color[] output, float min = 0F, float max = 1F)

Description

Fills an existing array with random desaturated colors of the base color to prevent heap allocations. The amount of colors generated is determined by the size of the array.

Parameters

baseColorThe base color to generate new colors from.
outputThe array to populate with random colors.
minThe minimum amount of change in desaturation [0..1] (default=0).
maxThe maximum amount of change in desaturation [0..1] (default=1).