colourpalettegenerator
v1.0.1
Published
From a .less, .scss, .css file, create a visual colour palette from hexidecimal colours
Downloads
2
Readme
Colour Palette Generator
From a .less, .scss, .css file, create a visual colour palette from hexidecimal colours
Intro
Have you ever inherited an existing project where you need to make some CSS changes / re-branding, but you just know even know what is the current brand guidelines, and what are the different colour being use on this site ?
You need a colour? This is colour palette will show you have what you currently have, pick an existing one!
Hopefully this is going to make us realise how many shade of one colour we have on a project, and stop us from getting more!
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development purposes.
Installing
# Using npm
npm install --save colourPaletteGenerator
Example
Then it can be used in your script like so:
Providing only the source, the palette will be created in the root directory
var colourPaletteGenerator = require('colourPaletteGenerator');
colourPaletteGenerator('relative/path/to/file.less');
Providing the source and the destination folder for the palette
var colourPaletteGenerator = require('colourPaletteGenerator');
# please note `my-folder` must exist
colourPaletteGenerator('relative/path/to/file.less', 'relative/path/to/my-folder/');
Good to know
- Only hexidecimal values are being read
- Duplicate colours are being removed from the palette
- Colours are sorted from light to dark (luminosity)
Potential improvements
- Support RGB, HSV, HSL and CMYK
- Categorise colours (Blues, Reds, Yellows, etc..)