postcss-sass-colors
v0.1.1
Published
PostCSS plugin sass like color functions
Downloads
223
Maintainers
Readme
PostCSS Sass Colors
PostCSS Sass like color functions.
Modify color lightness
.dark {
color: color( darken( #0189b7, 10% ) );
}
.light {
color: color( lighten( #0189b7, ) )
}
.dark {
color: #016384;
}
.light {
color: #01b2ee;
}
Convert hexadecimal values to rgb()
.rgb {
color: color( rgb( #0189b7 ) );
}
.rgb {
color: rgb(1, 137, 183);
}
Or to rgba()
.rgb {
color: color( rgb( #0189b7, 10 ) );
}
.rgb {
color: rgba(1, 137, 183, 0.90);
}
Usage
postcss([ require('postcss-sass-colors') ])
See PostCSS docs for examples for your environment.