randomColor

github.com ↗

Generate repeatable or constrained random colours in JavaScript.

SI Score
80/100
Pricing
Open Source AI reading, not confirmed
Free plan
Yes AI reading, not confirmed
Sign-up required
Not confirmed

Ask SI about randomColor

Answers use saved listing facts and recorded sources.
Homepage screenshot
Screenshot of the randomColor homepage

What it does

randomColor is a free CC0 JavaScript project for generating colour values with selectable hue, brightness, count and output format. A number or string seed can make the same configured generation repeatable.

Request a named hue family or pass a HEX colour whose hue should guide the result. Set luminosity to a bright, light or dark character, and supply count when a list is needed. The default output is HEX; RGB and HSL strings or arrays are also supported.

Transparency needs an explicit decision. Alpha applies only to RGBA and HSLA output, and defaults to a random value if it is not supplied. Set it when an interface expects a predictable opacity.

The script runs in a browser or Node.js and is dedicated under CC0 1.0. Its constraints guide random choices; they do not establish a contrast result for a particular label and background.

Strengths

  • A seed can stabilize generated values between renders.
  • A starting HEX value can constrain the hue family.

Watch out for

  • RGBA and HSLA output use random alpha unless specified.
  • Generated choices do not provide a foreground/background contrast check.

Best for

  • Prototypes assigning repeatable constrained colours

Sources