Colour bars/Display: Difference between revisions
Content added Content deleted
(Omit Axe) |
m (→{{header|PHP}}: Colours were in the wrong order in the image/png example.) |
||
Line 719: | Line 719: | ||
Will output result directly to the browser. Use it as CGI/BIN script. |
Will output result directly to the browser. Use it as CGI/BIN script. |
||
<lang PHP><?php |
<lang PHP><?php |
||
$colors = array(array( |
$colors = array(array( 0, 0, 0), // black |
||
array(255, 0, 0), // red |
array(255, 0, 0), // red |
||
array( 0, 255, 0), // green |
array( 0, 255, 0), // green |
||
array( 0, 0, 255), // blue |
array( 0, 0, 255), // blue |
||
array(255, 0, 255), // magenta |
array(255, 0, 255), // magenta |
||
⚫ | |||
array( 0, 255, 255), // cyan |
array( 0, 255, 255), // cyan |
||
array( |
array(255, 255, 0), // yellow |
||
⚫ | |||
define('BARWIDTH', 640 / count($colors)); |
define('BARWIDTH', 640 / count($colors)); |