Releases: oddbird/blend
Releases · oddbird/blend
v0.2.4
Remove Slash Division
- Correction to the sRGB to XYZ to sRGB matrices, improve round-tripping (based on CSSWG update)
- Update to use
math.div()
in place of slash as division
Fix docs and upgrade dependencies
- Documentation cleanup
- Upgraded dev dependencies
Patch license & docs
- Updated license to The Hippocratic License 2.1
- Documentation cleanup
Ready for Initial Release
v0.2.0 - 2020.05.27
- BREAKING: Moved project to oddbird/blend on GitHub,
and @oddbird/blend on NPM. - BREAKING: Remove over-complicated settings & output options for now.
Focus on practical Sass conversion to and from CIE functions. - NEW:
lch()
hue channel accepts any angle unit
(e.g.turn
,rad
,grad
, ordeg
) - NEW:
lab($lab, $a)
returns an (sRGB) Sass color - NEW: Inspect LCH/Lab values of a Sass color with
lightness()
a()
andb()
chroma()
andhue()
- NEW:
contrast()
selects the best contrast from a list - NEW: Generate new colors based on relative LCH & Lab adjustments:
set()
to replace a channel valueadjust()
to add or subtract from a channelscale()
to scale fluidly towards one "end" of the channel range
- NEW:
from()
converts a Sass color to LCH
in order to adjust CIE lightness, chroma, and hue --
using a syntax roughly based on
CSS Colors Level 5 relative syntax
Scope the package name
@mirisuzanne/blend
(there was a deprecated package already with the global name)
Initial LCH-to-RGB functions
In the main public API:
@use <'path/to>/blend';
Functions:
blend.lch(65% 75 0)
with optional alphablend.lch(10% 15 280, 85%)
, returns a Sass color
Config: $gamut-correct
true
[default]: Chroma is reduced until in-gamutfalse
: Individual RGB channels will be clippednull
: Returnnull
for out-of-gamut colors
If you want more explicit control,
use <path/to>/blend/sass/lab/lch
,
and access several functions directly:
lch.to-rgb()
does the conversion math on an array of channelslch.in-gamut()
returns either the converted channels
ornull
for out-of-gamut colorslch.gamut-correct()
uses chroma-reduction to get a color in-gamutlch.color()
takes LCH input and returns a Sass color
based on the chosen form of gamut-correction
Initial LCH-to-RGB functions
In the main public API:
@use <'path/to>/blend';
Functions:
blend.lch(65% 75 0)
with optional alphablend.lch(10% 15 280, 85%)
, returns a Sass color
Config: $gamut-correct
true
[default]: Chroma is reduced until in-gamutfalse
: Individual RGB channels will be clippednull
: Returnnull
for out-of-gamut colors
If you want more explicit control,
use <path/to>/blend/sass/lab/lch
,
and access several functions directly:
lch.to-rgb()
does the conversion math on an array of channelslch.in-gamut()
returns either the converted channels
ornull
for out-of-gamut colorslch.gamut-correct()
uses chroma-reduction to get a color in-gamutlch.color()
takes LCH input and returns a Sass color
based on the chosen form of gamut-correction