混水摸魚

[ PHP ] – 隨機產生網頁色碼 #FA10DE

隨機產生網頁色碼

function rand_color(){
  $color='';
  for($i = 0; $i < 3; $i++){
    $color.=dechex(rand(0, 255));
  }
  return "#".$color;
}

Leave a Comment

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *