I want to create a function that will accept any old string (will usually be a single word) and from that somehow generate a hexadecimal value between #000000
#000000
All you really need is a good hash function. On node, I just use
const crypto = require('crypto'); function strToColor(str) { return '#' + crypto.createHash('md5').update(str).digest('hex').substr(0, 6); }