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