Timeline for Create a hexadecimal colour based on a string with JavaScript
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 9, 2020 at 17:08 | comment | added | MoonLite |
supplement: to wrap colours back to first after all are used, replace the 2nd if with: if(!instance.stringToColorHash[str]) { instance.nextVeryDifferntColorIdx++; instance.nextVeryDifferntColorIdx %= instance.veryDifferentColors.length; instance.stringToColorHash[str] = instance.veryDifferentColors[instance.nextVeryDifferntColorIdx]; }
|
|
Mar 13, 2019 at 16:46 | comment | added | Pryftan | Fwiw there's an algorithm out there to determine contrast. I wrote something with it years ago (but in C). Too much going on to worry about it and it's an old answer anyway but figured I'd point out that there is a way to determine contrast. | |
May 23, 2017 at 12:34 | history | edited | URL Rewriter Bot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
Jun 26, 2015 at 18:03 | history | edited | Rick Smith | CC BY-SA 3.0 |
Break long sentence into 2 for better readability
|
Jun 24, 2015 at 21:28 | history | answered | Rick Smith | CC BY-SA 3.0 |