mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-13 07:48:26 +03:00
bug fix for color conversion (#177)
This commit is contained in:
parent
7266f45537
commit
4c14617523
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user