Displaying RGB Color Pallete in PHP
<html><title>Color Pallete by Kashid</title><body>
<table border=1>
<?php
for($i=1;$i<=255;$i+=20)
{
for($j=1;$j<=255;$j+=20)
{
for($k=1;$k<=255;$k+=20)
{
echo "<td bgcolor=#".dechex($i) .dechex($j) .dechex($k)."> .............</td>";
/*echo "<td bgcolor=#".dechex($i) .dechex($j) .dechex($k).">#".dechex($i) .dechex($j) .dechex($k)."</td>";*/
}
echo "<tr>";
}
}
?>
</body>
</html>
<table border=1>
<?php
for($i=1;$i<=255;$i+=20)
{
for($j=1;$j<=255;$j+=20)
{
for($k=1;$k<=255;$k+=20)
{
echo "<td bgcolor=#".dechex($i) .dechex($j) .dechex($k)."> .............</td>";
/*echo "<td bgcolor=#".dechex($i) .dechex($j) .dechex($k).">#".dechex($i) .dechex($j) .dechex($k)."</td>";*/
}
echo "<tr>";
}
}
?>
</body>
</html>
Note: If you want the Hexadecimal code of Color shade then comment out first echo and remove the comment on second echo.
No comments:
Post a Comment
Thanks for visiting my Blog!