-
Notifications
You must be signed in to change notification settings - Fork 35
Releases: Evercoder/culori
Releases · Evercoder/culori
v4.0.2
Bug fixes
- Changed XYZ <-> Oklab conversion matrices to match those used in the
css-color-4spec (#237, #249, #255) toGamut()throws a more useful error than simply crashing thenmodecolor space does not have lightness and chroma components (#261)- Changed reference component value ranges for
lab/lch/lab65/lch65to match CSS spec (#260)
Assets 2
v4.0.1
v4.0.0
Breaking changes
This release includes changes to how color strings are parsed, converted, and serialized, for better alignment to CSS specs:
- Clamp alpha to the
[0, 1]interval at parse-time. - Clamp L in
lab()/lch()to[0, 100], inoklab()/oklch()to[0, 1]at parse-time. - Correct numeric ranges in
hsl()andhwb()syntaxes from[0, 1]to[0, 100]. - Serialize missing components as
0in legacy syntaxes and asnonein modern syntaxes. - Use
0for missing components in all color space conversions and gamut mapping functions.
New features
- Adds the ICtCp color space, part of CSS Color HDR Module Level 1, with the name
itp; - Adds the ΔEITP color difference function as
differenceItp().
Fixes
- Make
averageAngle()always return in the[0, 360]interval; - Fix CIELUV (
luv) conversion forl = 0; - Allow CommonJS bare import
const culori = require('culori')(in addition to the previousculori/requireendpoint).
Assets 2
1 person reacted
v3.3.0
New features
- Adds a third parameter to
clampChroma()to change the destination RGB gamut (#212, #213) - Adds the ability to bypass the JND part of the CSS Color Level 4 gamut mapping algorithm by passing
nullas thedeltacolor difference function (#212, #213) - Adds the
easingSmoothstepInverse()function (re: #207)
Bug fixes
- Updates the sRGB inverse transfer function to match the CSS spec (see w3c/csswg-drafts#9467)
Assets 2
2 people reacted
v3.2.0
New features
Adds helper functions to interpolate values bilinearly (blerp()) and trilinearly (trilerp()). These are the extensions of linear interpolation (lerp()) to two and three dimensions, respectively. (Re: #207)
Assets 2
v3.1.3
Bug fixes
Replace non-ASCII identifiers with ASCII equivalents for better compatibility with build tools. (#205, thanks @VojtechVidra!)
Assets 2
1 person reacted
v3.1.2
v3.1.1
Bug fixes
Fixes an error in the parser that caused it to choke on malformed colors such as oklch(70% 0..1 156) (#204, thanks for reporting @raidenmiro)
Assets 2
v3.1.0
New features
This release introduces new gamut-related functions:
inGamut(mode)returns a function with which to check that a color is within the gamut of themodecolor space (#161); similar todisplayable(), but for any RGB-based color space.clampGamut(mode)returns a function with which to clip a color to the gamut of themodecolor space; similar toclampRgb()but for any RGB-based color space.toGamut(mode, ...)returns a function to gamut-map a color to themodecolor space (#168); similar toclampChromabut for any RGB-based color space.
Bug fixes
Fixes mapper() function when mode = null (See #194, thanks @bijela-gora!)
Assets 2
v3.0.1
Bug fixes
- Fixed a typo that allowed
<hue>components in thecolor()syntax - Included
oklabandoklchas exports in theculori/cssbundle.
New features
- Added
unlerp()as the reverse oflerp()
Assets 2
2 people reacted