Colour bars/Display: Difference between revisions

m (→‎Uxntal: Explain how colors work)
(→‎{{header|AmigaBASIC}}: add screenshot)
 
(4 intermediate revisions by one other user not shown)
Line 317:
=={{header|BASIC}}==
==={{header|AmigaBASIC}}===
[[File:Amigabasic color bars.png|thumb|Output]]
<syntaxhighlight lang="amigabasic">SCREEN 1,320,200,5,1
WINDOW 2,"Color bars",(0,10)-(297,186),15,1
Line 1,113 ⟶ 1,114:
where attrs = map color2attr colors
nBars = length colors
colors = [black, brightRed, brightGreen, brightBlue, brightMagenta, brightCyan, brightYellow, brightWhite]
color2attr c = Attr Default Default (SetTo c)
 
main :: IO ()
main = do
cfg <- standardIOConfig
Line 1,131 ⟶ 1,133:
showBars bounds
shutdown vty</syntaxhighlight>
 
[[File:Haskell_Colourbars_A_0.png|700px]]
 
Graphical version using SFML.
65

edits