postcss-alter-color

1.3.0 • Public • Published

postcss-alter-color

Build Status

A PostCSS plugin to replace one color with another color.

Install

npm install --save postcss-alter-color

Usage

const postcss = require('postcss');
const alterColorPlugin = require('postcss-alter-color');
 
const config = {
  from: 'darkslategray',
  to: '#556832'
};
 
postcss()
  .use(alterColorPlugin(config))

Input CSS:

body {
  background: white;
  color: darkslategray;
}
p {
  color: #2f4f4f;
}
.quote {
  border-left: 1px solid rgb(47, 79, 79);
  border-right: solid hsl(18025%25%) 1px;
}

Output CSS:

body {
  background: white;
  color: #556832;
}
p {
  color: #556832;
}
.quote {
  border-left: 1px solid #556832;
  border-right: solid #556832 1px;
}

License

MIT

Package Sidebar

Install

npm i postcss-alter-color

Weekly Downloads

0

Version

1.3.0

License

MIT

Unpacked Size

10.4 kB

Total Files

10

Last publish

Collaborators

  • mistakster