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.
With npm:
$ npm install --save cha-0
With yarn:
$ yarn add cha-0
const cha0 = require('cha-0')
const fooColor = cha0('foo')
console.log('#' + fooColor) // "#3dc680"