JSFiddle - React, Tailwind, and code Playground

by brigand

HTML

<script src="https://unpkg.com/[email protected]/crc32.js"></script>

<div id="out"></div>

JavaScript

const names = `
GreenJello
ZeroWalker
ycon_
`.split(/\s+/).filter(Boolean);

function color(name) {
  const hue = Math.floor((CRC32.str(name) + 2 ** 31) / (2 ** 32) * 360)
  return `hsl(${hue}, 100%, 42%)`
}

out.innerHTML = names.map(name => `<div style="color: ${color(name)}">${name}</div>`).join('\n')