Skip to content

mtso/cha-0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published