Skip to content

Instantly share code, notes, and snippets.

@nashingofteeth
Last active December 16, 2015 03:19
Show Gist options
  • Save nashingofteeth/5368662 to your computer and use it in GitHub Desktop.
Save nashingofteeth/5368662 to your computer and use it in GitHub Desktop.
random hexadecimal color generator
<style>
body {
color: white;
font-size: 15vmin;
font-family: helvetica;
text-align: center;
margin-top: 40vh;
text-shadow: .1vw .1vh 5px black;
}
</style>
<body></body>
<script>
var color = '#'+Math.floor(Math.random()*16777215).toString(16);
document.body.style.background = color;
document.write(color);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment