Skip to content

Bump color-space from 2.3.2 to 3.1.0 - #226

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/color-space-3.1.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/color-space-3.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 5, 2026

Copy link
Copy Markdown
Contributor

Bumps color-space from 2.3.2 to 3.1.0.

Release notes

Sourced from color-space's releases.

v3.1.0

  • sgamut3cine — Sony S-Gamut3.Cine / S-Log3, pinned by ACES vendor triples
  • composed conversions ~2× faster — monomorphic hub chains (rgb→lab 94→48 ns)
  • WASM batches beat JS 1.3–2.5× — sRGB encode via the exact x^(5/12) √√∛ identity
  • lab's display route fused into one pre-multiplied matrix, mirrored bit-exactly in GL
  • d3-color joins the benchmark; the Speed geomean column returns to the README
  • the atlas lives at color-space.io
  • refreshed gamut limits metadata

Full Changelog: colorjs/color-space@v3.0.0...v3.1.0

v3.0.0

  • 161 color spaces
  • Any-to-any graph wiring
  • WASM zero-copy batch
  • GLSL / WGSL chunks
  • .cube LUT export
  • ICC profile export
  • MCP server tools
  • Batch conversion form
  • lite 27-space hub
  • data.json metadata artifact
  • Lab now D50
  • Breaking: flat arguments

Full Changelog: colorjs/color-space@v2.3.2...v3.0.0

Changelog

Sourced from color-space's changelog.

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[3.0.0] - 2026-07-20

Breaking Changes

  • Channel-range corrections (entry corrected 2026-07 — it originally claimed v2 normalized all spaces to 0–1; it did not: v2 already used conventional ranges — rgb 0–255, hsl 0–360/0–100/0–100, cmyk 0–100, ycbcr 16–235 — and those are unchanged). Five spaces rescaled to conventional form: hsm and tsl (were all-0–1), hsi/hcy/hsp third channel 0–255 → 0–100 (hsp also no longer rounds its outputs). Declared bounds made truthful where the v2 metadata understated the formula (lab a/b ±125, luv ±215, …) — metadata only, outputs identical. Spaces new in v3 adopt CSS conventions: predefined-RGB (P3, Rec.2020, A98-RGB, ProPhoto) are 0–1 per the CSS color() function; OKLab/OKLCh/OKLrab/OKLrch native 0–1 / ±0.4 (oklch.rgb(0.65, 0.25, 180) ≡ CSS oklch(0.65 0.25 180)); JzAzBz/JzCzHz and ICtCp native (Jz/I 0–1, az/bz/Ct/Cp ±0.5), matching colorjs.io / Safdar 2017 / BT.2100.
  • Flat channel arguments: conversions take individual arguments — rgb.lab(10, 20, 30) — not an array rgb.lab([10, 20, 30]). (The array call returns as the batch form — see Added.)
  • Space object shape change: .min, .max, .channel, and .alias properties removed from space objects; replaced by .range.
  • Lab/LCHab are now D50 (ICC/CSS convention; v2 lab was D65). lab-d65 added for the v2-equivalent display-native Lab.
  • ciecam (cam) removed — the v2 one-way stub is superseded by the full bidirectional ciecam02.
  • cubehelix removed — a colormap (a single fraction painted to a color), not a color space you convert between; out of scope (README "What it isn't"). No replacement.
  • rec2100-pq / rec2100-hlg ship hyphenated (corrected 2026-07: previously listed as a rename — the unhyphenated files existed only in unreleased dev builds, never in a published v2).

See https://github.com/colorjs/color-space/blob/master/docs/migration.md for the v2→v3 upgrade path, verified against the v2.3.2 source.

Added

  • GLSL/WGSL shader chunks for all 161 graph spaces, including LUT-backed Munsell. A chunk is pure data ({ name, deps, edges, code }, like three.js ShaderChunk); color-space/gl is the engine that composes it — the engine imports the data, never the reverse. Import the spaces you convert and name the conversion: glsl(oklch, 'rgb') → vec3 oklch_rgb(vec3 c), the scalar library's shape one level down (cf. oklch.rgb(l, c, h)). glsl(oklch) bundles both directions; glsl(oklch, p3) routes a pair through their shared ancestor.
  • Lean by default: a per-space import brings only its own dependency chain (~5 kB minified), not the ~200 kB catalog — and stays pure data (oklch.code is its raw GLSL for hand-embedding), so importing a chunk never drags the composer along. Byte-identical to the full catalog.
  • Full-catalog tier color-space/gl/all routes any space by name — glsl('rgb', 'oklch') — for runtime from/to strings.
  • Multi-conversion shaders: glsl([[a,b], [c,d], …]) emits every entry with shared chunks deduped — paint in one space, gamut-test in another, one source.
  • WGSL for WebGPU, mechanically translated from the same chunks (wgsl(oklch) lean, color-space/gl/wgsl by name).
  • GL differential suite: every edge evaluated as JS in float64 against the scalar library (test/gl.js), all 590 generated GLSL sources compiled on WebGL2 (test/gl-gpu.html), and all 590 translated WGSL sources grammar-parsed in CI (test/wgsl.js) plus live WebGPU validation when available.
  • Complete reference coverage — all 161 graph spaces pinned to either the colorjs.io differential suite or a cited authoritative value (134 points), each entry carrying its source URL (test/bonafide.js).
  • Integrity sweep: every composed pair callable as bare functions (catches this-bound conversion hops).
  • meta.wiki — the canonical Wikipedia article per space (90 spaces; per-anchor verified), from a new @wiki JSDoc tag.
  • meta.year / meta.by / meta.use — provenance (when the space was introduced, by whom) and usage domain + current status for 139 spaces, from new @year/@by/@use JSDoc tags (cross-checked against each file's cited references).
  • color-space/wasm default export mirroring the scalar API: space.oklch.rgb(l, c, h) for scalars, space.rgb.oklch(buf) for whole buffers — an alloc()'d buffer converts in place (zero-copy), any other array-like returns a converted copy.
  • color-space/lut: any conversion as a .cube LUT — cube(space.slog3, space.rec709) — for DaVinci Resolve, Premiere, Final Cut, OBS, ffmpeg. Channelwise pairs (pure transfer curves, e.g. rec709→rgb) auto-emit LUT_1D_SIZE 4096; cross-channel pairs emit LUT_3D_SIZE 33 by default (17/33/65 Resolve convention). Every header carries the measured deviation of the interpolated lattice against the direct conversion at random off-lattice points (median + max, fractions of full scale), so the file states its own accuracy.
  • LUT differential suite against the scalar library plus an end-to-end ffmpeg check: the generated .cube applied to a float frame by ffmpeg itself must reproduce the library (test/lut.js, test/lut-ffmpeg.js).
  • Shaper LUTs — cube(from, to, { shaper: true }) prepends the conversion's own tone diagonal as a 1D shaper (Resolve-flavor combined LUT_1D+LUT_3D cube; Resolve/OCIO read it): measured, a shaped 33³ beats a plain 65³ for camera-log → display at ⅙ the size (logc4→rec2020 4.1e-3 vs 5.7e-3); super-range clips at the shaper.
  • color-space/icc — profile(space.p3) emits compact ICC v2 matrix+TRC display profiles for representable RGB working spaces; other bounded 1–4 channel spaces use sampled AToB/BToA CLUT profiles. Matrix colorants/TRCs derive mechanically from the space conversions and Bradford-adapt to the D50 PCS; output is pinned to Lindbloom/IEC values and host-verified through macOS ColorSync (test/icc.js, test/icc-colorsync.js).
  • color-space/data.json — the registry as one language-neutral artifact: per-space metadata + conventional ranges, conversion-graph edges, gamut primaries, CIE whitepoints, the CIE 1931 2° color-matching functions, and the cited conformance triples the suite pins to (npm run data; registry-drift test-pinned like meta.js).
  • color-space-mcp CLI (shipped by the color-space package) — zero-dependency MCP server over stdio JSON-RPC exposing convert/space/spaces/cube; driven end-to-end by test/mcp.js.
  • Source-only repo, generated site — the website stages into _site/ (npm run landing → scripts/build-site.js: web/ sources + runtime modules with root-relative imports + prerendered catalog, a per-space reference page each, sitemap/robots/llms) and deploys via GitHub Actions (pages.yml, full suite as the deploy gate); web/ holds the site source, docs/ only markdowns. Generated package artifacts (data.json, types/*.d.ts, dist/, wasm/binary.js) are produced by prepare; prepublishOnly rebuilds and runs source plus packed-consumer checks before publication.
  • Batch calling form on the JS hubs — every wired pair now also takes an interleaved array-like of pixels and returns a new Float64Array: space.rgb.oklch(pixels), for all 161 spaces. Stride follows each space's channel count (rgb→cmyk maps 3n→4n, kelvin→rgb 1n→3n), trailing params (ycbcr kb/kr) reach every pixel, and a batch of one is exactly the v2 calling convention — rgb.lab([50, 50, 50]) is legal again. Batch ≡ scalar pinned bit-for-bit across every pair (test/batch.js).
  • color-space/lite — the compact hub: exactly the WASM-covered 27 spaces (rgb/lrgb/xyz, OKLab family, CIE Lab/Luv + DIN99, HDR, camera logs) in plain JS, ~9 kB gzipped vs the catalog's ~55 kB. Same registry shape, both calling forms, register() included — the three hubs (color-space, /lite, /wasm) interchange conversion calls freely (wasm is the bare kernel: range/metadata/register live on the JS hubs); parity with the wasm space list is test-pinned.
  • WASM scalar kernels are true multi-value exports — each edge is rgb_lrgb(r, g, b) → (r′, g′, b′) (jz multi-value; i64 f64-bit lanes mapped by the jz:i64exp custom section), so the module's ABI mirrors the scalar API and scalar calls never touch the working buffer. Batch loops destructure the same kernels per pixel — each formula exists exactly once in wasm/batch.js — and the two forms are pinned bit-identical on every pair.
  • Migration guide rewritten from verified v2.3.2 source diffs (https://github.com/colorjs/color-space/blob/master/docs/migration.md); linked from the README. The previous guide's central claim — "v2 normalized everything to 0–1" — was false (see the channel-range correction above), and its ×255 conversion recipes would have double-scaled correct v2 code.
  • Identity conversions — space.rgb.rgb(…), scalar and batch, on all three hubs (MCP convert included).
  • Machine-readable loss semantics — data.spaces.<name>.loss (projective / lookup / quantized) + lossNote tag the inherently non-invertible nodes: kelvin, cct-duv, maxwell, wavelength, gray, rg, cmyk, munsell, acesproxy.
  • cct-duv, preserving both dimensions of near-white chromaticity as correlated colour temperature plus signed CIE 1960 uv distance; projective at conventional Y=100.
  • Explicit legal-range Y′CbCr spaces for BT.601 525-line (SMPTE-C), BT.601 625-line (PAL/EBU), BT.709, and BT.2020 non-constant-luminance, fixing primaries, transfer, coefficients, and range in each id.
  • Human-LMS maxwell graph space for fixed-observer trichromatic receptor-catch chromaticity.

... (truncated)

Commits
Install script changes

This version adds prepare script that runs during installation. Review the package contents before updating.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [color-space](https://github.com/colorjs/color-space) from 2.3.2 to 3.1.0.
- [Release notes](https://github.com/colorjs/color-space/releases)
- [Changelog](https://github.com/colorjs/color-space/blob/master/CHANGELOG.md)
- [Commits](colorjs/color-space@v2.3.2...v3.1.0)

---
updated-dependencies:
- dependency-name: color-space
  dependency-version: 3.1.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

📦 Preview the website for this branch here: https://deploy-preview-226--ol-bench.netlify.app/.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants