cha-0

1.0.2 • Public • Published

CHA-0

CHA-0 is a color hashing algorithm designed to output a random hex color string for a given string input. CHA-0 gives a good distribution over the hex color space through a multiplicative hashing scheme.

Build Status

Install

With npm:

$ npm install --save cha-0

With yarn:

$ yarn add cha-0

Usage

const cha0 = require('cha-0')
const fooColor = cha0('foo')
console.log('#' + fooColor) // "#3dc680"

Try it out at runkit.com

/cha-0/

    Package Sidebar

    Install

    npm i cha-0

    Weekly Downloads

    0

    Version

    1.0.2

    License

    none

    Last publish

    Collaborators

    • mtso