Advertisement
R8934

Random color function

Mar 27th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function colour_random() {
  2.         var num = Math.floor(Math.random() * Math.pow(2, 24));
  3.         return '#' + ('00000' + num.toString(16)).substr(-6);
  4.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement