Values.js

The lightness or darkness of a color is called its value.
Tints are light values that are made by mixing a color with white, which increases lightness.
Shades are dark values that are made by mixing a color with black, which reduces lightness.
http://noeldelgado.github.io/Values.js/
Installation
Node
npm install values.js
Bower
bower install values.js
Usage
var Values = require('values.js');
<script src="path-to-values/index.js"></script>
Example
var color = new Values('#0099ff');
console.log(color.hex)
console.log(color.rgb)
console.log(color.hsl)
console.log(color.hexString())
console.log(color.rgbString())
console.log(color.hslString())
console.log(color.getBrightness())
color.tints().forEach(function(tint) {
console.log(tint);
});
color.shades().forEach(function(shade) {
console.log(shade);
});
color.all().forEach(function(color) {
console.log(color);
});
Methods
setColor
color.setColor('ff0');
color.setColor('rgb(255,255,0)');
color.setColor('hsl(60,100%,50%)');
tint
color.tint();
color.tint(10);
color.tint(24);
shade
color.shade();
color.shade(9);
color.shade(31);
tints
color.tints(20).forEach(function(tint) {
console.log(tint)
})
shades
color.shades(20).forEach(function(shade) {
console.log(shade)
})
all
color.all().forEach(function(color) {
console.log(color)
})
Values.Utils
isHex(color)
Values.Utils.isHEX('09c') => true
Values.Utils.isHEX('#09c') => true
Values.Utils.isHEX('#0099cc') => true
Values.Utils.isHEX('09cc') => false
isRGB(color)
Values.Utils.isRGB('rgb(0,0,0)') => true
Values.Utils.isRGB('rgba(0,0,0,.0)') => true
Values.Utils.isRGB('0,0,0') => false
isHSL(color)
Values.Utils.isHSL('hsl(198,58%,1%)') => true
Values.Utils.isHSL('hsla(360,10%,10%, 1)') => true
Values.Utils.isHSl('hsl(361,10%,10%)') => false
Dev
npm install
npm run dev