Back to Explore

Qix-/color-convert

GitHub
1 watchersOpen source

Last release: 6 months ago

color-convert is a JavaScript and Node library that converts between common color formats and models, including rgb, hsl, hsv, hwb, cmyk, ansi, ansi16, hex strings, and CSS keyword values. It provides conversion functions with rounded and unrounded (.raw) variants, and routes between models using sub-conversions when a direct conversion is not explicitly defined.

Project status

  • Actively maintained, with recent GitHub updates (latest known update 3.1.3 on 2025-11-14, and upstream push on 2025-11-14).
  • Apparent update cadence is moderately paced, with updates at roughly 2025-05-13 (3.1.0), 2025-09-13 (3.1.2), and 2025-11-14 (3.1.3), suggesting ongoing iteration.

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 3.1.3

    6 months ago

    Release 3.1.3 makes a small behavior adjustment to the keyword to RGB conversion. The documented change is that convert.keyword.rgb now returns a mutable array instead of returning the internal shared array reference.

  • 3.1.2

    8 months ago

    Release 3.1.2 is described as functionally identical to 3.1.0. The release notes also warn that version 3.1.1 was compromised and points users to an external issue report.

  • 3.1.0

    5/13/2025

    Release 3.1.0 adds support for the OKLAB and OKLCH color spaces, including conversions to and from existing spaces like RGB and XYZ. The release notes only call out OKLAB conversions, but the code diff also includes TypeScript typing surface changes and an internal refactor to sRGB companding used by XYZ conversions.

    Features
  • 3.0.0

    2/5/2025

    Version 3.0.0 primarily shifts the library to ESM and improves/adjusts certain color conversion calculations (notably xyz/srgb precision and rgb to ansi256 gray handling). The code diff also shows a broader API restructuring around a routed conversion graph and new TypeScript typings, which is not described in the provided release notes.

    BreakingFeatures
  • 0.6.0

    7/23/2015

    Release 0.6.0 adds a set of ANSI color conversion functions to the library, covering both 16-color and 256-color spaces, plus reverse conversions back to RGB. The code diff mainly expands the public export surface and extends tests accordingly, with some ancillary updates to README, changelog, and CI configuration.

    Features
  • 0.5.3

    6/2/2015

    Release 0.5.3 fixes a specific issue in the color conversion utility hsl2hsv. Previously, converting [0,0,0] could incorrectly return NaN; this has been corrected.