Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

function to generate random color in javascript

function random(number){
    return Math.floor(Math.random()*number);;
}
function randomColor(){
 return 'rgb('+random(255)+','+random(255)+','+random(255)+')';    
}
Source by www.paulirish.com #
 
PREVIOUS NEXT
Tagged: #function #generate #random #color #javascript
ADD COMMENT
Topic
Name
9+1 =