Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/avigoldman/postcss-colornames-to-hex

PostCSS plugin to convert color names to hexadecimal values
https://github.com/avigoldman/postcss-colornames-to-hex

colornames colors hexidecimal plugin postcss

Last synced: about 8 hours ago
JSON representation

PostCSS plugin to convert color names to hexadecimal values

Awesome Lists containing this project

README

        

# postcss-colornames-to-hex

This plugin will convert CSS color names like `blue` or `black` to their hexadecimal equivalent.

### Installation

```sh
npm install postcss-colornames-to-hex --save
```

### Usage

```js
postcss([ require('postcss-colornames-to-hex') ])
// do your processing here 🎉
```

Or use it in some other [PostCSS way](https://github.com/postcss/postcss#usage).

### Example

You put this in....

```css
a {
color: blue;
}
```

and you get this out...

```css
a {
color: #0000FF;
}
```