Generate more effective color harmonies with HUSL
npm install husl_harmonyhusl_harmony for the first 14 swatch sets for color #3D7AFA yields these:
husl_harmony is mostly meant for code use, and primarily ships back arrays of hex-6 colors of the form ['#aabbcc', '#ddeeff'].
husl_harmony also includes a harmonious gray balancer with color overlay
javascript
window.onload = function() {
var husl_harmony = require('husl_harmony'),
swatch_div = husl_harmony.make_all_swatches('#3D7AFA');
document.body.innerHTML = 'All swatch sets matching #3D7AFA
';
document.body.appendChild(swatch_div);
}
`
Color swatch sets will be balanced in hue, saturation, lightness, and oriented to the source color.
ES6 Usage
`javascript
// let's get the analogous-7 matches of our color, a dark blue, #0026ff
import {from_rgb} from './husl_harmony.js';
console.log( from_rgb('#0026FF', 'analogous-7') );
`
The result should be
`javascript
["#005e53", "#005c64", "#00597b", "#0026FF", "#8e00a9", "#9c007e", "#a50051"]
`
ES5 Usage
`javascript
// see dist/index.html for a working example
var hh = require('husl_harmony');
console.log( hh.from_rgb('#0026FF', 'analogous-7') );
`
The result should be
`javascript
["#005e53", "#005c64", "#00597b", "#0026FF", "#8e00a9", "#9c007e", "#a50051"]
``