Skip to main content

RandomColorGenerator

A random color generator, random within bounds, it won't return a color with any component outside the range (20, 245). It also attempts to ensure that it doesnt give out two colors that are too similar. You can call reset on the color generator if you want to clear its history.

Type Parameters

CTX

CTX

Implements

Methods

generate()

generate(ctx?): string

Generate a random color. Within certain bounds.

Parameters

ctx?

CTX

Returns

string

Implementation of

ColorGenerator.generate