bug fix for color conversion (#177)

This commit is contained in:
Luke Westby 2018-11-16 11:39:14 -08:00 committed by GitHub
parent 7266f45537
commit 4c14617523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,11 @@ toCoreColor (Css.hex "#FFFFFF") -- "RGBA 255 255 255 1 : Color.Color"
-}
toCoreColor : Css.Color -> Color.Color
toCoreColor cssColor =
Color.rgba (toFloat cssColor.red) (toFloat cssColor.green) (toFloat cssColor.blue) cssColor.alpha
Color.rgba
(toFloat cssColor.red / 255)
(toFloat cssColor.green / 255)
(toFloat cssColor.blue / 255)
cssColor.alpha
{-| Add an alpha property to a Css.Color