mirror of
https://github.com/jtdaugherty/brick.git
synced 2025-01-08 15:08:46 +03:00
Themes: fix a bug that prevented bright colors from being parsed in theme files
This commit is contained in:
parent
a6cabf218f
commit
15a77fe15d
@ -191,10 +191,11 @@ isNullCustomization c =
|
||||
parseColor :: T.Text -> Either String (MaybeDefault Color)
|
||||
parseColor s =
|
||||
let stripped = T.strip $ T.toLower s
|
||||
normalize (t, c) = (T.toLower t, c)
|
||||
in if stripped == "default"
|
||||
then Right Default
|
||||
else maybe (Left $ "Invalid color: " <> show s) (Right . SetTo) $
|
||||
lookup stripped (swap <$> allColors)
|
||||
else maybe (Left $ "Invalid color: " <> show stripped) (Right . SetTo) $
|
||||
lookup stripped (normalize <$> swap <$> allColors)
|
||||
|
||||
allColors :: [(Color, T.Text)]
|
||||
allColors =
|
||||
|
Loading…
Reference in New Issue
Block a user