Skip to content

v0.1.0

Latest

Choose a tag to compare

@ult666666 ult666666 released this 24 Oct 00:58

First release of contrastkit. Install from source: see the README quick start.

Added

  • Library (zero runtime dependencies, ESM + CommonJS + type declarations):
    • Parsing of hex, rgb()/rgba(), hsl()/hsla(), oklch() and the 148 CSS named
      colors, with typed errors (ColorParseError, InvalidArgumentError); formatting to hex,
      rgb(), hsl() and oklch().
    • Conversions between sRGB, linear sRGB, OKLab, OKLCH and HSL, and CSS Color 4 gamut
      mapping into sRGB.
    • WCAG 2.2 relative luminance, contrast ratio (with compositing of translucent
      foregrounds) and checks for SC 1.4.3, 1.4.6 and 1.4.11.
    • suggestFix: the closest passing foreground by OKLCH lightness, ranked by ΔE_OK.
    • simulateCvd: protanopia, deuteranopia and tritanopia after Machado, Oliveira &
      Fernandes (2009).
    • auditPalette and checkRequirements for palette-wide audits.
  • CLI contrastkit with check, fix and audit commands, --json output and exit codes
    for CI.
  • Palette Auditor web app (React + Vite), deployable to GitHub Pages.
  • CI workflow (lint, format, typecheck, tests with coverage, builds on Node 20/22/24) and a
    GitHub Pages deployment workflow.

Read more: Design notes · Palette Auditor · Foundations walkthrough