Skip to content

v2.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 24 Aug 20:26
· 11 commits to master since this release

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 to clr:
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']);