Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I must say that this is a really odd way of doing it. It kind of works but there aren't very many colors available. XOR of the first two colors makes no distinction of order so there are just combinations of letters. A simple addition I did to increase the number of colors was var seed = 0; for (var i in input_str) { seed ^= i; }
    – Gussoh
    Commented Sep 30, 2015 at 12:59
  • Yes, it really depends how many colours you'd like to generate. I recall in this instance I was creating different panes in a UI and wanted a limited number of colours rather than a rainbow :) Commented Oct 19, 2018 at 4:49