PostCSS plugin to transform W3C CSS hwb() function to more compatible CSS (rgb() or rgba()).
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

postcss-color-hwb CSS Standard Status Build Status

PostCSS plugin to transform W3C CSS hwb() color to more compatible CSS (rgb() (or rgba())).


$ npm install postcss-color-hwb


// dependencies
var fs = require("fs")
var postcss = require("postcss")
var colorHwb = require("postcss-color-hwb")

// css to be processed
var css = fs.readFileSync("input.css", "utf8")

// process css
var output = postcss()

Using this input.css:

body {
  color: hwb(90, 0%, 0%, 0.5);

you will get:

body {
  color: rgba(128, 255, 0, 0.5);

Checkout tests for more examples.


Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.

$ git clone
$ git checkout -b patch-1
$ npm install
$ npm test