aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Color.elm
diff options
context:
space:
mode:
authorJoris2016-10-03 20:24:59 +0200
committerJoris2016-10-03 20:24:59 +0200
commit2a11b28d2ee636eb730dbb5767104aeac9936afa (patch)
treec7261376073d9334007d24fbe67acda6e11943fa /src/Model/Color.elm
parentc79aae101926d3e5a123b707dd1324dca50994b7 (diff)
parent3a1cbfe23a3d06c3c30828c623a089868cff0670 (diff)
Merge branch 'master' into demo
Diffstat (limited to 'src/Model/Color.elm')
-rw-r--r--src/Model/Color.elm22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/Model/Color.elm b/src/Model/Color.elm
deleted file mode 100644
index 49ece2b..0000000
--- a/src/Model/Color.elm
+++ /dev/null
@@ -1,22 +0,0 @@
-module Model.Color exposing
- ( Color
- , htmlOutput
- , mergeColors
- )
-
-type alias Color =
- { red : Int
- , green : Int
- , blue : Int
- }
-
-htmlOutput : Color -> String
-htmlOutput color = "rgb(" ++ (toString color.red) ++ ", " ++ (toString color.green) ++ ", " ++ (toString color.blue) ++ ")"
-
-mergeColors : Float -> Color -> Color -> Color
-mergeColors ratio c1 c2 =
- let mergePart x y = truncate (ratio * (toFloat x) + (1 - ratio) * (toFloat y))
- in { red = mergePart c1.red c2.red
- , green = mergePart c1.green c2.green
- , blue = mergePart c1.blue c2.blue
- }