simple-colors-scss
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "simple-colors-scss", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Simple color management for SCSS", | ||
"main": "_colors.scss", | ||
"main": "_core.scss", | ||
"scripts": { | ||
@@ -7,0 +7,0 @@ "test": "test", |
@@ -14,1 +14,39 @@ # simple-colors-scss | ||
`` npm install simple-colors-scss --save-dev `` | ||
After installation an empty template, ``_colors.scss`` will be created outside of the node_modules folder. | ||
Import the NPM package and colors.scss in your stylesheet before other logic: | ||
``` | ||
@import 'your_project/node_modules/simple-colors-scss/functions'; | ||
@import 'your_project/colors'; | ||
``` | ||
## Usage | ||
By default the function ``color()`` is used to get a value from it's name. | ||
It's quite versatile and can contain most values like HEX, RGB, RGBA, HSL and some meta values. | ||
``` | ||
// These are all valid values | ||
'hex': #123456, | ||
'rgb': rgb(255,0,128), | ||
'rgba' rgba(255,255,255, .33), | ||
'none': transparent, | ||
``` | ||
## Customisation | ||
Within ``_colors.scss`` apply your primary colors in the ``$colors`` variable. | ||
Next add bindings and variations using the color() function. | ||
**Basic example:** | ||
``` | ||
$colors: { | ||
'deep-orange': #BDBDBD | ||
} | ||
$binding: { | ||
'sidebar': color('gray'), | ||
'sidebar-text': darken(color('gray'), 60%) | ||
} | ||
``` |
2476
52