<?php
// You can do this, programmatically, using the following code ... Test It Yourself (TIY)
$colors=(file("random.txt"));//colors array
$c1=sizeof($colors)-1;//get position of the last element within the colors array
// -- OR, if you prefer --
//$c1=count($colors)-1;//get position of the last element within the colors array
//pick a color at random from the colors array - 'Mersenne Twister based'
$color=$colors[mt_rand(0,$c1)];
echo<<<HERE
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="2">
</head>
<body>
<div style="width:400px; background-color:$color; border:1px; text-align:center;" >
$color
</div>
</body>
</html>
HERE;
?>