Tutorial Random Hex Color
Technique #1 $rand = array('0', '1', '2', '3', '4', '5', '6', '7', ...
https://iskablogs.blogspot.com/2014/03/tutorial-random-hex-color_4.html
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
$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