Skip to content

Commit

Permalink
Fix fallback colors
Browse files Browse the repository at this point in the history
Co-authored-by: Vlad Fisher <VKFisher@users.noreply.github.com>
  • Loading branch information
vladimirlogachev and VKFisher committed May 4, 2024
1 parent cccc756 commit 7a7d9a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions example/src/Pages/Home_.elm
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ color1 =
ExtraColor.oklchPercent 68.64 0.255 36.4


{-| This color should look the same in RGB -}
color2 : ExtraColor
color2 =
ExtraColor.oklchPercent 71.87 0.181 229.1

ExtraColor.oklchPercent 70.4 0.109 229.1

color3 : ExtraColor
color3 =
Expand Down Expand Up @@ -94,6 +94,7 @@ viewMobile layout =
, gridColumn layout { widthSteps = 2 } [ Font.color Color.white ] [ text "RGB fallback" ]
]
]

++ List.map (viewColor layout) [ color1, color2, color3, color4 ]
)

Expand Down
2 changes: 1 addition & 1 deletion src/Culori.elm
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ convertLrgbToRgb { r, g, b, alpha } =

toElmUiColor : RgbaColor -> Color
toElmUiColor { r, g, b, alpha } =
Element.rgba (fn r) (fn g) (fn b) alpha
Element.rgba r g b alpha

0 comments on commit 7a7d9a8

Please sign in to comment.