prp

postcss-rgb-plz

PostCSS plugin to convert hex colors to rgb

Showing:

Popularity

Downloads/wk

2

GitHub Stars

2

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

2

Size (min+gzip)

29.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

postcss-rgb-plz npm version

PostCSS plugin to convert hex colors to rgb.

.foo {
  color: #333;
  box-shadow: 2px 2px 4px #f1f1f1;
}
.foo {
  color: rgb( 51, 51, 51 );
  box-shadow: 2px 2px 4px rgb( 241, 241, 241 );
}

Install

npm i --save-dev postcss-rgb-plz

Usage

postcss([ require('postcss-rgb-plz') ])

See PostCSS docs for examples for your environment.

Reasoning

Part of the CSS styleguide at my work is to always use rgb values for color, and sometimes I like to use hexes/my preprocessor will convert to hexes. This solves that issue.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100