Skip to content

Chore(deps): Bump chroma-js from 3.2.0 to 3.3.0 - #8765

Merged
github-actions[bot] merged 1 commit into
stable34from
dependabot/npm_and_yarn/stable34/chroma-js-3.3.0
Nov 21, 2026
Merged

github-actions[bot] merged 1 commit into
stable34from
dependabot/npm_and_yarn/stable34/chroma-js-3.3.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 21, 2026

Copy link
Copy Markdown
Contributor

Bumps chroma-js from 3.2.0 to 3.3.0.

Release notes

Sourced from chroma-js's releases.

v3.3.0

What's Changed

New Contributors

Full Changelog: gka/chroma.js@v3.2.0...v3.3.0

Changelog

Sourced from chroma-js's changelog.

3.3.0

  • chroma.blend() now takes the alpha of both colors into account, compositing the second color over the first (source-over). Previously alpha was discarded, so a transparent top color still changed the result and two translucent colors produced an opaque one. Blending opaque colors gives the same results as before. Results can now be translucent, in which case hex() returns eight digits (e.g. chroma.blend('rgba(0,0,255,0.5)', 'rgba(255,0,0,0.5)', 'normal').hex() is '#aa0055bf'). Also fixes burn throwing for a white backdrop with a black source, which now returns white.
  • Fix chroma.average() in hue-based modes (hsl, hsv, lch, hcl, …) depending on the order of the colors. The first color's weight was applied to its hue angle as well as its contribution, and an achromatic first color (e.g. white or gray) was counted as hue 0° (red). For example, chroma.average(['white', 'blue'], 'hsl') returned #df9fdf instead of #9f9fdf.
  • Fix hcl/lch/oklch interpolation not reaching pure black/white exactly when interpolating from a saturated color
  • Preserve full alpha precision when parsing #rrggbbaa / #rgba hex colors. hex2rgb rounded the alpha channel to two decimals, so 136 of 256 alpha bytes did not round-trip (for example chroma('#ff000088').hex() returned #ff000087). Alpha is now parsed exactly as aa / 255, matching the RGB channels and CSS Color 4.
  • Fix the hcg color space. color.hcg() returned chroma and grayness on a 0–100 scale while chroma.hcg() expects 0–1, so converting a color to HCG and back, as well as mixing, averaging or building scales in hcg mode, produced black or threw an error. color.hcg() now returns chroma and grayness on a 0–1 scale.
  • Keep the alpha channel when constructing a color from an HSL object. chroma({ h: 120, s: 0.8, l: 0.75, a: 0.5 }) previously returned an opaque color; it now has an alpha of 0.5, like the RGB object form already did.
  • Fix chroma.limits(data, 'k', n) (k-means) dropping clusters. The cluster tally was incremented inside the nearest-centroid loop, so each point was counted up to n times against intermediate best-so-far indices, corrupting the centroid means. It is now counted once per point after the argmin, so well-separated data yields the expected breaks (chroma.limits([0,1,2,50,51,52,100,101,102], 'k', 3) returns [0, 2, 52, 102]).
  • Handle missing LCH lightness as zero when parsing CSS colors.
  • Fix parsing of legacy rgba(r, g, b, a) CSS colors: percentage alpha (e.g. rgba(255,0,0,50%)) was read on the 0–255 channel scale and clamped to 1, and none produced NaN channels
  • Fix alpha being NaN for colors constructed without an alpha channel from oklab, oklch or gl
  • Reject non-numeric RGB channels instead of silently treating them as 0. chroma('nonsense', 0, 255, 'rgb') and chroma(null, 0, 255, 'rgb') now throw invalid rgb color, as do NaN channels or alpha. Out-of-range numbers are still clipped as before.
  • Rename the internal RGB-to-HSV converter from rgb2hsl to rgb2hsv, so stack traces and debugging show the correct name. No change in behavior.
  • Fix scale.classes(n) ignoring a later scale.domain() call. Class boundaries set with a number are now recomputed when the domain changes, so .classes(5).domain([-2, 2]) gives the same five colors as .domain([-2, 2]).classes(5) instead of only black and white. Explicit class breaks passed as an array are unchanged when the domain changes.
  • Fix scales with a gamma() throwing for values outside the domain. chroma.scale('YlGn').domain([5, 15]).gamma(1.2)(4) previously threw an error; out-of-domain values are now clamped to the nearest end of the scale, as they are without a gamma.
  • Preserve opacity when setting an individual color channel.
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 [chroma-js](https://github.com/gka/chroma.js) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/gka/chroma.js/releases)
- [Changelog](https://github.com/gka/chroma.js/blob/main/CHANGELOG.md)
- [Commits](gka/chroma.js@v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: chroma-js
  dependency-version: 3.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@github-actions
github-actions Bot enabled auto-merge November 21, 2026 03:11
@github-actions
github-actions Bot merged commit 60cfafe into stable34 Nov 21, 2026
39 checks passed
@github-actions
github-actions Bot deleted the dependabot/npm_and_yarn/stable34/chroma-js-3.3.0 branch November 21, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants