on master help sign in
Fix colors
96bdb40Evan Czaplicki
Examples/elm-yesod/elm_source/mouse.elm+11−5
@@ -1,9 +1,15 @@
1−niceBlue = rgb 0 (1/3) (2/3)
1+
2−clearGreen = rgba (1/9) (8/9) (3/9) (1/2)
2+-- Move your mouse around above the canvas!
3+
4+import Signal.Mouse (position)
5+import Signal.Window (dimensions)
6+
7+myBlue = rgb 0 85 170
8+myGreen = rgba 28 267 85 (1/2)
3
9
4scene (x,y) (w,h) =
10scene (x,y) (w,h) =
5− collage w h [ filled niceBlue . rotate ((x+y)/1000) $ ngon 4 100 (200,200)
11+ collage w h [ filled myBlue . rotate ((x+y)/1000) $ ngon 4 100 (200,200)
6− , filled clearGreen $ ngon 5 30 (x,y)
12+ , filled myGreen $ ngon 5 30 (x,y)
7 ]
13 ]
8
14
9−main = lift2 scene Mouse.position Window.dimensions
15+main = lift2 scene position dimensions