Colour bars/Display: Difference between revisions

m
size of picture adjusted
m (→‎Uxntal: Explain how colors work)
m (size of picture adjusted)
 
(3 intermediate revisions by the same user 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.
5

edits