NewYour coding agent can read the release notes before it upgrades.Set up the MCP server β
npm, #2048 most downloaded on npm
π A tiny yet powerful JavaScript library for high-performance color manipulations and conversions
Latest stable
2.14.0
Last release 5 days ago
17 Nov 2026
Ships unpredictably
gaps range from 8 days to 4.0 years
Nearly every release is documented
notes for 54 of 59 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
59 releases Β· first in 2020
Drag across the ruler to compare, or tap a release to open it.
New: lab plugin parses lab() strings and adds toLabString() β€οΈ @bardrop
lab plugin parses lab() strings and adds toLabString() β€οΈ @bardropdevice-cmyk(0% 0% 0% 90%) is #1a1a1a and not #191919 β€οΈ @simonkundrikhsl() and for whiteness/blackness in hwb(), such as hsl(120 50 50) and hwb(120 20 30) β€οΈ @bardroplab plugin clamps a lightness above 100 to 100, as CSS Color 4 requires, such as { l: 130, a: -60, b: 60 } β€οΈ @bardroprgb() that mixes numbers and percentages, such as rgb(10% 20 30) β€οΈ @bardrophwb(0 10% 0%) is #ff1a1a as in browsers, not #ff1919; grayscale(), rotate(), saturate(), lighten() and harmonies() may shift such channels one step too β€οΈ @simonkundriktoCmyk() and toCmykString() round a percent that is exactly half up, so #050808 is c: 38, not c: 37Your coding agent can read these notes before it upgrades. Set up the MCP server β
New relative option of lighten , darken , saturate and desaturate that scales the current value β€οΈ @EricRovell
relative option of lighten, darken, saturate and desaturate that scales the current value β€οΈ @EricRovelllch plugin clamps a negative chroma to 0 instead of flipping the hue, such as lch(50% -20 30) β€οΈ @bardroplch plugin parses a plain number lightness and a percentage chroma, such as lch(52.2 72.2 56.2) β€οΈ @Kernel-Hunterminify() no longer picks an hsl() string that rounds to a different colornames plugin no longer treats "constructor" and "__proto__" as valid colors β€οΈ @Kernel-HunterParse numbers in scientific notation ( rgb(1e2 .5e1 0 / 25e-2) ), as the CSS spec allows
rgb(1e2 .5e1 0 / 25e-2)), as the CSS spec allowshsl(0.25TURN 50% 50%) means 90 degrees instead of 0.25 β€οΈ @blueDaydreaming725mix() endpoints and when only alpha differs, so a mixture into white no longer turns green after .darken() β€οΈ @feritcemkahramannode16 and nodenext resolutionNew oklab and oklch plugins to parse and convert OKLab and OKLCH colors (CSS Color 4)
oklab and oklch plugins to parse and convert OKLab and OKLCH colors (CSS Color 4)Fix: Read the alpha byte of a HEX color exactly, so #cc88 no longer comes back as #cccc8887 β€οΈ @spokodev
#cc88 no longer comes back as #cccc8887 β€οΈ @spokodevminify from turning down an alpha hex that holds the color exactly, and from returning nothing at all when every notation is switched offmix, tints, shades and tones (mix plugin) now accept an optional interpolation color space. LAB stays the default; pass "rgb" to interpolate RGB chann
mix, tints, shades and tones (mix plugin) now accept an optional interpolation color space. LAB stays the default; pass "rgb" to interpolate RGB channels instead β the way browsers and design tools (such as Figma) composite translucent layers.import { colord, extend } from "colord";
import mixPlugin from "colord/plugins/mix";
extend([mixPlugin]);
colord("#ff0000").mix("#ffffff", 0.5, "rgb").toHex(); // "#ff8080"
colord("#f0f3f1").mix("#007d40", 0.14, "rgb").toHex(); // "#cee2d8" β same as compositing rgba(0, 125, 64, 0.14) over #f0f3f1
colord("#ff0000").tints(3, "rgb").map((c) => c.toHex()); // ["#ff0000", "#ff8080", "#ffffff"]
mix plugin by adding an optional "rgb" interpolation mode to mix, tints, tones and shadesMake HEX parsing and serialization more than 2x faster
Fix: Rotate the unrounded hue so rotate and harmonies preserve the original color
rotate and harmonies preserve the original colorFix: Use adjusted chroma for the CIEDE2000 rotation term β€οΈ @maximilliangrand
[0, 360) in every color model β€οΈ @sarathfrancis90Both fixes change returned numbers for a small set of colors; toHex() output is unchanged. Snapshots holding h: 360, "hsl(360, β¦)" or a delta() value may need updating.
Fix: Reject malformed color strings in linear time β€οΈ @GAP-dev
Fix types export for TypeScript 4.7 β€οΈ @pkishorez
Fix: Add "package.json" to exports map
Fix: Make minification lossless
New minify plugin adding color string minification utilities.
minify plugin adding color string minification utilities.import { colord, extend } from "colord";
import minifyPlugin from "colord/plugins/minify";
extend([minifyPlugin]);
colord("black").minify(); // "#000"
colord("#112233").minify(); // "#123"
colord("darkgray").minify(); // "#a9a9a9"
colord("rgba(170,170,170,0.4)").minify(); // "hsla(0,0%,67%,.4)"
colord("rgba(170,170,170,0.4)").minify({ alphaHex: true }); // "#aaa6"
@EricRovell added delta method to calculate the perceived color difference (CIE Delta E 2000) between two colors. The return value is 0 if the colors
delta method to calculate the perceived color difference (CIE Delta E 2000) between two colors. The return value is 0 if the colors are equal, 1 if they are entirely different.colord("#faf0c8").delta("#ffffff"); // 0.148
colord("#3296fa").delta("#197dc8"); // 0.099
colord("#afafaf").delta("#b4b4b4"); // 0.014
colord("#000000").delta("#ffffff"); // 1
delta method to calculate the perceived color difference between two colors β€οΈ @EricRovell@EricRovell added new tints, tones and shades methods to mix plugin.
tints, tones and shades methods to mix plugin.const color = colord("#ff0000");
color.tints(3).map((c) => c.toHex()); // ["#ff0000", "#ff9f80", "#ffffff"];
color.shades(3).map((c) => c.toHex()); // ["#ff0000", "#7a1b0b", "#000000"];
color.tones(3).map((c) => c.toHex()); // ["#ff0000", "#c86147", "#808080"];
mix plugin by adding new tints, tones and shades methods β€οΈ @EricRovellSupport "double split complementary" color harmony generation β€οΈ @EricRovell & @lbragile
New closest option of toName method allows you to find the closest color if there is no exact match
closest option of toName method allows you to find the closest color if there is no exact match@EricRovell added a new plugin to perform harmony colors generation.
import { colord, extends } from "colord";
import harmoniesPlugin from "colord/plugins/harmonies";
extend([harmoniesPlugin]);
const color = colord("#ff0000");
color.harmonies("analogous").map((c) => c.toHex()); // ["#ff0080", "#ff0000", "#ff8000"]
color.harmonies("complementary").map((c) => c.toHex()); // ["#ff0000", "#00ffff"]
color.harmonies("rectangle").map((c) => c.toHex()); // ["#ff0000", "#ffff00", "#00ffff", "#0000ff"]
color.harmonies("split-complementary").map((c) => c.toHex()); // ["#ff0000", "#00ff80", "#0080ff"]
color.harmonies("tetradic").map((c) => c.toHex()); // ["#ff0000", "#80ff00", "#00ffff", "#8000ff"]
color.harmonies("triadic").map((c) => c.toHex()); // ["#ff0000", "#00ff00", "#0000ff"]
Add new isEqual method β€οΈ @EricRovell
isEqual method β€οΈ @EricRovell@EricRovell added a new plugin to perform CMYK conversions
import { colord, extend } from "colord";
import cmykPlugin from "colord/plugins/cmyk";
extend([cmykPlugin]);
colord("#ffffff").toCmyk(); // { c: 0, m: 0, y: 0, k: 0, a: 1 }
colord("#999966").toCmykString(); // "device-cmyk(0% 0% 33% 40%)"
colord({ c: 0, m: 0, y: 0, k: 100, a: 1 }).toHex(); // "#000000"
colord("device-cmyk(0% 61% 72% 0% / 50%)").toHex(); // "#ff634780"
- Add new hue and rotate methods
hue and rotate methodsImprove the precision of alpha values
Strict string color parsing conforming to the CSS Color Level specifications
Simplify package "exports" field to improve different environments support
Parse a color name disregarding the case
Support HWB color strings (CSS functional notation)
getFormat utilitygetFormat utilityImprovement: You can now use every angle unit supported by CSS (deg, rad, grad, turn).
New random function that returns a new Colord instance with a random color value inside
random function that returns a new Colord instance with a random color value insideMix colors through CIE LAB color space
Added a new mix plugin which brings a modern color mixing functionality
mix plugin which brings a modern color mixing functionalitySupport modern CSS notations of RGB, HSL and LCH color functions
New plugin adding support of CIE LAB color space
Fix: Do not treat 7-digit hex as a valid color β€οΈ @subzey
New plugin adding support of CIE LAB color space
- Make bundle 1% lighter
- π΅οΈββοΈ Added isValid method
isValid methodThe fastest and tiniest color manipulation library is officially live!
The fastest and tiniest color manipulation library is officially live!
Sort named colors dictionary for better compression β€οΈ @subzey
Ignore null input in the parsers
null input in the parsersShorten conversion method names (toRgba to toRgb, etc)
toRgba to toRgb, etc)More accurate HSL and HSV conversions
Names plugin: Support "transparent" keyword
- Improve package exports
- Add CommonJS exports
New plugin: a11y (Accessibility)
New plugin: CIE XYZ color space
20% speed improvement β€οΈ @jeetiss
- 100% code coverage
Make plugin available in Parcel which doesn't support exports map yet
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
- New plugin: CSS color names
- Make the library ESM-first - Add code coverage reports
- Implement Plugin API
- Basic API
Nothing published for this version
One column per quarter.