rendered paste body<?phpecho draw_table(create_grid(25, 0, 256));function create_grid($size, $start_colour, $end_colour){ $step = ($end_colour - $start_colour) / $size; $current_colour = $start_colour; $colours = array(); $colours[] = null; for ($i = 0; $i <= $size; $i++) { $colours[] = ceil($current_colour); $current_colour += $step; } $grid = array(); for ($i = 0; $i <= $size; $i++) { $pad = array(); for ($x = 0; $x < $i; $x++) { $pad[] = $end_colour; } array_shift($colours); $grid[] = array_merge($colours, $pad); } return $grid;}function draw_table($grid){ $html = "<table cellspacing=0 cellpadding=0>\n"; for ($i = 0; $i <= count($grid); $i++) { $html .= "<tr>"; for ($x = 0; $x <= count($grid); $x++) { $html .= "<td height=10 width=10 bgcolor=\"#0000" . sprintf("%02x", $grid[$i][$x]) . "\">"; } $html .= "</tr>\n"; } $html .= "</table>"; return $html;}?>