title: JS: need a css color code based on a string
body: <p>I need a function to generate a CSS color based on a string with a range of <code>min: #000000</code> and <code>max: #FFFFFF</code>. If the length or any of the characters in the input string changes, the function should return a different color (but it must always return the same color on the same string input).</p>
  
  <p>For Example:</p>
  
  <pre><code>f("Reddit") ==&gt;#FF0000
  
  f("Smith") ==&gt;#FFC0CB   
  
  f("Smixh")==&gt;#F008FF
  
  f("Smith") ==&gt;#FFC0CB
  
  f("foo")==&gt;#FF00FF
  
  f("Reddit") ==&gt;#FF0000
  </code></pre>
  
  <p>And so on. Any idea how to do that?</p>