text: export function stringToHash(string) {
  
    let hash = 0
  
    if (string.length === 0) return hash
  
    for (let i = 0; i < string.length; i++) {
      const char = string.charCodeAt(i)
      hash = ((hash << 5) - hash) + char
      hash = hash & hash
    }
  
    return hash
  }
  
  export function randomColorFromSeed(seed) {
    return '#'+(0x1000000+(/* Math.random() */ seed)*0xffffff).toString(16).substr(1,6)
  }
  
  export function getContrastYIQ(hexcolor){
    hexcolor = hexcolor.replace("#", "");
    const r = parseInt(hexcolor.substr(0,2),16);
    const g = parseInt(hexcolor.substr(2,2),16);
    const b = parseInt(hexcolor.substr(4,2),16);
    const yiq = ((r*299)+(g*587)+(b*114))/1000;
    return (yiq >= 128) ? 'black' : 'white';
  }
  