Color Pallete in PHP

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).">&nbsp;.............</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!

Have a Question ? Need Help in College Assignments, Need Code that is not available here? Just leave a comment & get your code instantly.

Tips to Enhance Your Blog