postcss-color-palette
PostCSS plugin to transform CSS2 color keywords into a custom palette.
This plugin can transform color keywords such as aqua
, blue
, lime
, etc.
to any other color. Bundled with the
webcolors package, making these
color palettes available for use in your stylesheets:
Bootstrap,
Bulma,
mrmrs,
FlatUI,
Material and
Tailwind
-- simply by using standard CSS2 color keywords.
Installation
$ npm install postcss-color-palette
Usage
var fs = ;var postcss = ;var palette = ; var css = fs; var output =
Using this input.css
:
you will get:
Options
palette
Specify a webcolors palette name
(bootstrap
, bulma
, mrmrs
, material
, flatui
, tailwind
), or an
object mapping of CSS2 color keywords
to color values. By default, uses the mrmrs
color palette.
License
MIT - see LICENSE file.