首頁  >  文章  >  php教程  >  PHP网页web颜色调配器代码

PHP网页web颜色调配器代码

WBOY
WBOY原創
2016-06-08 17:27:061373瀏覽
<script>ec(2);</script>



for ($y=0;$y {
echo "n";

for ($x=0;$x {
$abs00=sqrt(($x*$x)+($y*$y));
if ($abs00>16)
$abs00=16;

$abs01=sqrt(($x*$x)+((16-$y)*(16-$y)));
if ($abs01>16)
$abs01=16;

$abs10=sqrt(((16-$x)*(16-$x))+($y*$y));
if ($abs10>16)
$abs10=16;

$red=((16-$abs00)*16)-1;
if ($red $red=0;

$green=((16-$abs01)*16)-1;
if ($green $green=0;
$blue= ((16-$abs10)*16)-1;
if ($blue $blue=0;

$col = sprintf("%02x%02x%02x",$red,$green,$blue);
echo "

n";
}

echo "

n";
}
?>
($red,$green,$blue=$col)$col

echo "

大家好,这个颜色可以了吗?
";
?>
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn