Colour bars/Display: Difference between revisions

m
size of picture adjusted
m (Try to fix Wren section starting after image instead of in newline.)
m (size of picture adjusted)
 
(6 intermediate revisions by 2 users not shown)
Line 1,113:
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,132:
showBars bounds
shutdown vty</syntaxhighlight>
 
[[File:Haskell_Colourbars_A_0.png|700px]]
 
Graphical version using SFML.
Line 2,059 ⟶ 2,062:
 
|0100
( set theme4 )color theme
rgb
color0: 000 - black
color1: f00 - red
color2: 0f0 - green
color3: 00f - blue )
#0f00 .System/r DEO2
#00f0 .System/g DEO2
Line 2,077 ⟶ 2,085:
INC DUP #04 NEQ ?&loop
BRK</syntaxhighlight>
[[File:Color-bars.png|alt=Color bars task implemented in Uxntal.|left|thumb|Color bars task implemented in Uxntal.|none]]
 
=={{header|Wren}}==
{{trans|Go}}
5

edits