Tutorial Random Hex Color

Technique #1 $rand = array('0', '1', '2', '3', '4', '5', '6', '7', ...

Technique #1

$rand = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f');
$color = '#'.$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)];

?>
Then echo out the $color value anywhere you need it. For example:

Technique #2

Hot in Week

Popular

Archive

item