Jump to content

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(255 0, 255 0, 255 0), // whiteblack
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, 0255, 0), 0)); // blackyellow
array(255, 255, 0255), ); // yellowwhite
 
define('BARWIDTH', 640 / count($colors));
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.