color-spacer
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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' ]

Readme

Keywords

Package Sidebar

Install

npm i color-spacer

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

5.51 kB

Total Files

6

Last publish

Collaborators

  • gliese1337