Javascript Random Color


/ Published in: JavaScript
Save to your folder(s)

Generates random hex values ("You know, these guys: #0afec0, #c9f2d0, #9b923e")


Copy this code and paste it in your HTML
  1. '#' + Math.floor(Math.random() * 16777215).toString(16);

URL: http://paulirish.com/2009/random-hex-color-code-snippets/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.