New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

postcss-color-hwb

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-color-hwb

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

3.0.0
latest
Source
npm
Version published
Weekly downloads
100K
-18.65%
Maintainers
3
Weekly downloads
 
Created
Source

postcss-color-hwb Build Status

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

Installation

$ npm install postcss-color-hwb

Usage

// 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()
  .use(colorHwb())
  .process(css)
  .css

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.

Contributing

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

$ git clone https://github.com/postcss/postcss-color-hwb.git
$ git checkout -b patch-1
$ npm install
$ npm test

Changelog

License

Keywords

css

FAQs

Package last updated on 15 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts