theme-color
Material theme color generator.
DEMO
http://qingwei-li.github.io/theme-color/
Install
$ npm i theme-color -S
Quick Start
const tc = 'blue' 'red' tc/*{ "lightPrimary": "#BBDEFB", "primary": "#2196F3", "darkPrimary": "#1976D2", "accent": "#FF5252"}*/ tc/* .color-light-primary: { background-color: "#BBDEFB"; } .color-primary: { background-color: "#2196F3"; } .color-dark-primary: { background-color: "#1976D2"; } .color-accent { background-color: "#FF5252"; } */
Options
- primaryColor: String
- accentColor: String
Material color: ['red', 'pink', 'purple', 'deepPurple', 'indigo', 'blue', 'lightBlue', 'cyan', 'teal', 'green', 'lightGreen', 'lime', 'yellow', 'amber', 'orange', 'deepOrange', 'brown', 'grey', 'blueGrey']
// primary color blue, accent color redvar tc = 'blue' 'red' // randomvar tc = // random accent colorvar tc = 'blue'
API
get()
theme color object. like
"lightPrimary": "#BBDEFB" "primary": "#2196F3" "darkPrimary": "#1976D2" "accent": "#FF5252"
css(options: Object)
return css string.
const tc = 'blue' 'red' tc
output
CLI
-c --config
config file. like
-o --output
output css file.
-d --demo
output demo html file.
License
WTFPL