menghasilkan kode warna hex unik acak menggunakan php
echo '#' . substr(str_shuffle('ABCDEF0123456789'), 0, 6);
Ankur
echo '#' . substr(str_shuffle('ABCDEF0123456789'), 0, 6);
<?php
function randomColor()
{
return "rgb(".rand(0,255).",".rand(0,255).",".rand(0,255).");";
}
?>
<body style="background-color:"<?php echo randomColor(); ?>"">