Random CSS Color code This blog post about generating random CSS color codes in JavaScript have multiple solutions for generating a random color in JavaScript. The shortest I can find is this:

'#'+(Math.random()*0xffffff).toString(16).slice(-6)


If you are not familiar with CSS color code read documentations here.

Can we do better? What about other languages?
PHP 23 bytes

#&lt;?=md5(rand())&amp;ÿÿÿÿÿÿ;


Where ÿ is character 255. Bitwise and will truncate the string returned from md5, which is already in hexadecimal format.