Content Management Php



Color





// color cell fill
$fill = "     ";
$col_r = 0; // red color
$col_g = 0; // green color
$col_b = 0; // blue color
$row_return = 0;
$block_return = 0;
echo "
";
while($col_r <= 255) {
$col_g = 0;
echo "";
}else {
echo "";
}
}
echo "
216 Colours Pallete
";
$block_return++;
while($col_g <= 255) {
$col_b = 0;
while($col_b <= 255) {
$red = strtoupper(dechex($col_r));
$green = strtoupper(dechex($col_g));
$blue = strtoupper(dechex($col_b));
$color = str_pad($red, 2, '0', STR_PAD_LEFT)."".str_pad($green, 2, '0', STR_PAD_LEFT)."".str_pad($blue, 2, '0', STR_PAD_LEFT);
?>

// Form the row of 6 colors...
$row_return++;
if($row_return==6) {
echo "
";
$row_return = 0;
}
$col_b+=51; // decrement for more colors, but be carefull, there are over 16 Million colors
}
$col_g+=51; // decrement for more colors, but be carefull, there are over 16 Million colors
}
$col_r+=51; // decrement for more colors, but be carefull, there are over 16 Million colors
// deal with the end rows in order to display the colors in a table...
if($block_return == 3) {
echo "
"; // end row & table
// Display the Grey colors
$col = 16;
echo "
";
echo "

Greyscale

";
while($col <= 255) {
$red = strtoupper(dechex($col));
$green = strtoupper(dechex($col));
$blue = strtoupper(dechex($col));
$color = str_pad($red, 2, '0', STR_PAD_LEFT)."".str_pad($green, 2, '0', STR_PAD_LEFT)."".str_pad($blue, 2, '0', STR_PAD_LEFT);
?>

$col +=16;
}
echo "
";
?>


Hex Value: