Skip to content

vivintsolar-oss/color-spacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

color-spacer

Utility for generating evenly-spaced colors around an HSV color wheel.

const { getColors } = require('./dist/index.js');

getColors(6); // [ '#ff0000', '#ffff00', '#00ff00', '#00ffff', '#0000ff', '#ff00ff' ]
getColors(3); // [ '#ff0000', '#00ff00', '#0000ff' ]
getColors(3, { shift: Math.PI / 6 }); // [ '#ffff00', '#00ffff', '#ff00ff' ]
getColors(3, { s: 0.5 }); // [ '#ff8080', '#80ff80', '#8080ff' ]
getColors(3, { v: 0.5 }); // [ '#800000', '#008000', '#000080' ]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published