randomstringtocsscolor
randomstringtocsscolor copied to clipboard
Convert a random String into a CSS color with browser build-in techniques.
On [this SO question](https://stackoverflow.com/questions/8318911/why-does-html-think-chucknorris-is-a-color), where I found a link to this tool, the OP mentions that `"chucknorr"` outputs a shade of yellow. In [this codepen](https://codepen.io/anon/pen/PeBZQK) you can see that this...
``` js // contrast function by http://stackoverflow.com/a/11868398 function getContrastYIQ(hexcolor){ hexcolor = hexcolor.substr(1); var r = parseInt(hexcolor.substr(0,2),16); var g = parseInt(hexcolor.substr(2,2),16); var b = parseInt(hexcolor.substr(4,2),16); var yiq = ((r*299)+(g*587)+(b*114))/1000; return (yiq...
The purpose: you could send URLs to your friends with their name colors.
For example, my string is _Ooker_, so in the explanation it should say: 1. Change each non-hex character to a 0 `000e0` 2. Add 0's to the string until its...
I think it would be nice if a parameter could be added for the textfield, so that I can actually link to it (e.g. for social media sharing), i.e. sth...
The check I edited was true too often. This results in a string like "fxxxxca" being translated to "000c00" instead of the correct "f000a0".
Examples: "almamater" becomes "#000ae0" "f0ff0ff0f" becomes "#0f0f0f" This is because `result[1].charAt(0) == result[3].charAt(0) == result[5].charAt(0) == 0` compares the result of each comparison to the following value, rather than comparing...
http://randomstringtocsscolor.com/TimSuck (You get the point) http://randomstringtocsscolor.com/#TimSuck (You get the point)
Keywords like "blue" should not be interpreted because they do exist. Source: [JSON of all colors](http://news.e-scribe.com/361)