v2.0.0
Changelog: v1.1.0...v2.0.0
- Paint Bucket is now a single package that exposes multiple exports that affect what plugins are included.
Import all plugins and color models automatically, not tree-shakeable:
import { Color } from 'paint-bucket';
Import plugins manually, tree-shakeable:
import { Color } from 'paint-bucket/core';
import rgbPlugin from 'paint-bucket/plugin/rgb';
// Enable the plugin
rgbPlugin(Color);
color
was renamed toclr
:
clr('pink').css(); // ⮕ "#ffc0cb"
- Stops can be added to gradient dynamically:
clr.gradient()
.stop(0, 'red')
.stop(50, 'pink')
.stop(100, 'blue')
.at(70)
.css();
// ⮕ "#9973e0"
- Stops can be added to gradient statically:
clr.gradient(['#fff', '#000']);
-
Added palette plugin that introduces
complement
,triad
,tetrad
,splitComplement
,analogous
, andmonochromatic
palette functions.