Random.RandomSquare

Extension Method in Random

Declaration

public static Color[] RandomSquare(this Color baseColor, int amount, float variance = 0.25F, float min = 0F, float max = 1F)

Description

Creates a tetradic (square) harmony of the color, four colors evenly spaced around the color wheel to form a square (90° hue shifts).

Parameters

baseColorThe base color to create the harmony from.
amountThe amount of colors to create.
varianceThe amount of variance in tints and shades [0..1] (default=0.25).
minThe minimum amount of change in the hue shift [0..1] (default=0).
maxThe maximum amount of change in the hue shift [0..1] (default=1).

Returns

Color[]An array of colors forming the harmony.