postcss-google-color
2.0.1 • Public • Published PostCSS Google Color 

A PostCSS for easily invoking the colors on the Google Material design color palette
Installation
npm install postcss-google-color
Examples
Simple use
div { color: google-color(teal) }
Select shade level
div { color: google-color(teal, 800) }
Get contrasting text color
div { background: google-color(red); color: google-color(contrast red) }
div { background: #f44336; color: #ffffff }
Usage
postcss([require('postcss-google-color')]).process(yourCSS);
const gulp = require('gulp');
const postcss = require('gulp-postcss');
const gc = require('postcss-google-color');
gulp.task('css', () => {
gulp.src('path/to/dev/css')
.pipe(postcss([
gc()
]))
.pipe(gulp.dest('path/to/build/css'));
});
Tests
npm test
License
This project is licensed under the MIT License.
/postcss-google-color/
//
Package Sidebar
Install
npm i postcss-google-color
Weekly Downloads