Skip to content

Releases: oddbird/blend

v0.2.4

14 Dec 20:28
52b0d01
Compare
Choose a tag to compare
  • 🏠 INTERNAL: Remove documentation from npm package
  • 🏠 INTERNAL: Upgrade dependencies

New Contributors

Full Changelog: v0.2.3...v0.2.4

Remove Slash Division

19 Sep 01:19
c7f6752
Compare
Choose a tag to compare
  • 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

30 Jun 19:34
f091824
Compare
Choose a tag to compare
  • Documentation cleanup
  • Upgraded dev dependencies

Patch license & docs

28 Apr 16:23
Compare
Choose a tag to compare
  • Updated license to The Hippocratic License 2.1
  • Documentation cleanup

Ready for Initial Release

27 Apr 23:20
Compare
Choose a tag to compare

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, or deg)
  • NEW: lab($lab, $a) returns an (sRGB) Sass color
  • NEW: Inspect LCH/Lab values of a Sass color with
    • lightness()
    • a() and b()
    • chroma() and hue()
  • NEW: contrast() selects the best contrast from a list
  • NEW: Generate new colors based on relative LCH & Lab adjustments:
    • set() to replace a channel value
    • adjust() to add or subtract from a channel
    • scale() 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

06 Apr 17:44
Compare
Choose a tag to compare

@mirisuzanne/blend

(there was a deprecated package already with the global name)

Initial LCH-to-RGB functions

06 Apr 17:29
Compare
Choose a tag to compare

In the main public API:

@use <'path/to>/blend';

Functions:

  • blend.lch(65% 75 0) with optional alpha blend.lch(10% 15 280, 85%), returns a Sass color

Config: $gamut-correct

  • true [default]: Chroma is reduced until in-gamut
  • false: Individual RGB channels will be clipped
  • null: Return null 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 channels
  • lch.in-gamut() returns either the converted channels
    or null for out-of-gamut colors
  • lch.gamut-correct() uses chroma-reduction to get a color in-gamut
  • lch.color() takes LCH input and returns a Sass color
    based on the chosen form of gamut-correction

Initial LCH-to-RGB functions

06 Apr 17:28
Compare
Choose a tag to compare

In the main public API:

@use <'path/to>/blend';

Functions:

  • blend.lch(65% 75 0) with optional alpha blend.lch(10% 15 280, 85%), returns a Sass color

Config: $gamut-correct

  • true [default]: Chroma is reduced until in-gamut
  • false: Individual RGB channels will be clipped
  • null: Return null 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 channels
  • lch.in-gamut() returns either the converted channels
    or null for out-of-gamut colors
  • lch.gamut-correct() uses chroma-reduction to get a color in-gamut
  • lch.color() takes LCH input and returns a Sass color
    based on the chosen form of gamut-correction