chore(deps): update dependency chroma-js to v3.3.0 #48
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/all"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
3.2.0→3.3.0Release Notes
gka/chroma.js (chroma-js)
v3.3.0Compare 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 casehex()returns eight digits (e.g.chroma.blend('rgba(0,0,255,0.5)', 'rgba(255,0,0,0.5)', 'normal').hex()is'#aa0055bf'). Also fixesburnthrowing for a white backdrop with a black source, which now returns white.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#df9fdfinstead of#​9f9fdf.#rrggbbaa/#rgbahex colors.hex2rgbrounded the alpha channel to two decimals, so 136 of 256 alpha bytes did not round-trip (for examplechroma('#ff000088').hex()returned#ff000087). Alpha is now parsed exactly asaa / 255, matching the RGB channels and CSS Color 4.hcgcolor space.color.hcg()returned chroma and grayness on a 0–100 scale whilechroma.hcg()expects 0–1, so converting a color to HCG and back, as well as mixing, averaging or building scales inhcgmode, produced black or threw an error.color.hcg()now returns chroma and grayness on a 0–1 scale.chroma({ h: 120, s: 0.8, l: 0.75, a: 0.5 })previously returned an opaque color; it now has an alpha of0.5, like the RGB object form already did.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 tontimes 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]).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, andnoneproducedNaNchannelsNaNfor colors constructed without an alpha channel fromoklab,oklchorgl0.chroma('nonsense', 0, 255, 'rgb')andchroma(null, 0, 255, 'rgb')now throwinvalid rgb color, as doNaNchannels or alpha. Out-of-range numbers are still clipped as before.rgb2hsltorgb2hsv, so stack traces and debugging show the correct name. No change in behavior.scale.classes(n)ignoring a laterscale.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.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.Configuration
📅 Schedule: (UTC)
🚦 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.
This PR has been generated by Mend Renovate CLI.
📋 Changelog
📦 Version Information
0.2.10.2.1Unreleased (795565b..795565b)
Package updates
All changes
Miscellaneous Chores
Generated by cocogitto
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.