CSS-Tricks Example

Random Hex Color

This is javascript required. Reload the page for another.

Javascript:

var randomColor = Math.floor(Math.random()*16777215).toString(16);