colord

github.com ↗

Chain colour transformations while keeping earlier values unchanged.

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 colord

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

What it does

colord is a TypeScript colour library with immutable operations, CSS parsing and optional plugins.

Install colord, parse a colour, chain adjustments and return a hex, RGB or HSL value. Each transformation preserves the earlier instance.

Plugins add named colours, further colour models, harmonies and contrast checks. Register the features required by the project. The accessibility plugin accepts AA or AAA and small or large text settings.

Check isValid() before using external input: failed parsing returns black instead of throwing an error. Named colours also require their plugin.

Its MIT licence permits commercial reuse and modifications with the notices included.

Strengths

  • Type declarations accompany the dependency-free core.

Watch out for

  • Invalid input silently falls back to black.

Best for

  • Typed interface-colour utilities

Sources