chore(deps): update dependency chroma-js to v3.3.0 #48

Open
renovate-forgejo wants to merge 1 commit from renovate/all into main
Collaborator

This PR contains the following updates:

Package Type Update Change
chroma-js devDependencies minor 3.2.0 → 3.3.0

Release Notes

gka/chroma.js (chroma-js)

v3.3.0

Compare Source

  • 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.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [chroma-js](https://github.com/gka/chroma.js) | devDependencies | minor | [`3.2.0` → `3.3.0`](https://renovatebot.com/diffs/npm/chroma-js/3.2.0/3.3.0) | --- ### Release Notes <details> <summary>gka/chroma.js (chroma-js)</summary> ### [`v3.3.0`](https://github.com/gka/chroma.js/blob/HEAD/CHANGELOG.md#330) [Compare Source](https://github.com/gka/chroma.js/compare/v3.2.0...v3.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 `#&#8203;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. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjIuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
chore(deps): update dependency chroma-js to v3.3.0
All checks were successful
ci / formatting (pull_request) Successful in 19s
ci / lint-and-test (pull_request) Successful in 34s
release / release-changelog (pull_request) Successful in 48s
795565bd5c

📋 Changelog

📦 Version Information

  • Current version: 0.2.1
  • Previous version: 0.2.1

Unreleased (795565b..795565b)

Package updates

All changes

Miscellaneous Chores

  • (deps) update dependency chroma-js to v3.3.0 - (795565b) - Renovate Bot

Generated by cocogitto

## 📋 Changelog **📦 Version Information** - Current version: `0.2.1` - Previous version: `0.2.1` ## Unreleased ([795565b..795565b](https://git.h.oluflorenzen.de/finkregh/userscripts/compare/795565b..795565b)) ### Package updates ### All changes #### Miscellaneous Chores - (**deps**) update dependency chroma-js to v3.3.0 - ([795565b](https://git.h.oluflorenzen.de/finkregh/userscripts/commit/795565bd5c5c69ba3a8d289b1fecbc7a94552ace)) - Renovate Bot *Generated by [cocogitto](https://github.com/cocogitto/cocogitto)*
All checks were successful
ci / formatting (pull_request) Successful in 19s
ci / lint-and-test (pull_request) Successful in 34s
release / release-changelog (pull_request) Successful in 48s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'renovate/all:renovate/all'
git switch 'renovate/all'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'renovate/all'
git switch 'renovate/all'
git rebase 'main'
git switch 'main'
git merge --ff-only 'renovate/all'
git switch 'renovate/all'
git rebase 'main'
git switch 'main'
git merge --no-ff 'renovate/all'
git switch 'main'
git merge --squash 'renovate/all'
git switch 'main'
git merge --ff-only 'renovate/all'
git switch 'main'
git merge 'renovate/all'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
finkregh/userscripts!48
No description provided.