1.0.0 • Published 8 years ago
postcss-choose-color v1.0.0
PostCSS Choose Color
PostCSS plugin for choosing foreground color based on the background color brightness. The first argument is the background color in (hex, rgb or rgba). The second argument is the color that will be used on light background color. The third argument is the color that will be used on dark background color.
p {
color: chooseColor("#000", "black", "white");
}
h1 {
color: chooseColor("rgb(255, 255, 255)", "black", "white");
}
p {
color: white;
}
h1 {
color: black;
}
Usage
postcss([ require('postcss-choose-color') ])
1.0.0
8 years ago