randomColors(numColors)

Generates an array of random colors.

Arguments

  • numColors (Number): The number of colors to generate.

Returns

(String[]): The array of colors (e.g., ['#ff00cc', '#f0c0a1', ...])

Example

randomColors(6);

Output

["#8b6683", "#cf930c", "#979af7", "#eeab8f", "#404bc9", "#49f51f"]

results matching ""

    No results matching ""