/oss · 2 merged

gka/chroma.js

A JavaScript library for working with colors.

the project on GitHub (opens in a new tab)
  1. 16 Nov 2026

    Averaging oklch colors goes around the color wheel

    What was broken
    Averaging red and pink in oklch gave teal, because the hue was averaged as a plain number, not an angle.
    What I changed
    The hue is now averaged around the circle, as it is for the other color modes.
    Why it matters
    Blends in oklch give the color people expect, matching other color libraries.

    see the code, #424 (opens in a new tab)

  2. 16 Nov 2026

    oklab and oklch colors keep 3 decimals

    What was broken
    Colors written as oklab or oklch text were rounded to 2 decimals, which on that small scale visibly changed the color.
    What I changed
    They now keep 3 decimals.
    Why it matters
    A color saved as text and read back looks the same as before.

    see the code, #423 (opens in a new tab)

← every project