@@ -58,39 +58,46 @@ themeNames :: [String]
5858themeNames = map fst themesList
5959
6060(&) = withStyle
61- active = fg brightWhite & bold
62- selectbg = yellow
63- select = black `on` selectbg
61+
62+ -- colors from the 8-bit (ish) 240-colour palette (see
63+ -- <https://rich.readthedocs.io/en/stable/appendix/colors.html>, subtract
64+ -- 16 to correct the offset from the 4-bit color palette). These colors
65+ -- should appear the same in all supported terminals.
66+ white8 = Color240 (253 - 16 )
67+ black8 = Color240 (232 - 16 )
68+ red8 = Color240 (124 - 16 )
69+ yellow8 = Color240 (178 - 16 )
70+ blue8 = Color240 (25 - 16 )
71+ active8 = fg (Color240 (255 - 16 )) & bold
72+ -- we use reverseVideo here to have a legible fallback if the terminal does
73+ -- not support the colors (and falls back to black/white)
74+ select8 = yellow8 `on` black8 & reverseVideo
75+ moo = yellow8 `on` red8 & reverseVideo -- & bold
6476
6577themesList :: [(String , AttrMap )]
6678themesList = [
67- (" default" , attrMap (black `on` white) [
68- (attrName " border" , white `on` black & dim)
69- ,(attrName " border" <> attrName " bold" , currentAttr & bold)
70- ,(attrName " border" <> attrName " depth" , active)
71- ,(attrName " border" <> attrName " filename" , currentAttr)
72- ,(attrName " border" <> attrName " key" , active)
73- ,(attrName " border" <> attrName " minibuffer" , white `on` black & bold)
74- ,(attrName " border" <> attrName " query" , active)
75- ,(attrName " border" <> attrName " selected" , active)
76- ,(attrName " error" , fg red)
77- ,(attrName " help" , white `on` black & dim)
78- ,(attrName " help" <> attrName " heading" , fg yellow)
79- ,(attrName " help" <> attrName " key" , active)
80- -- ,(attrName "list" , black `on` white)
81- -- ,(attrName "list" <> attrName "amount" , currentAttr)
82- ,(attrName " list" <> attrName " amount" <> attrName " decrease" , fg red)
83- -- ,(attrName "list" <> attrName "amount" <> attrName "increase" , fg green)
84- ,(attrName " list" <> attrName " amount" <> attrName " decrease" <> attrName " selected" , red `on` selectbg & bold)
85- -- ,(attrName "list" <> attrName "amount" <> attrName "increase" <> attrName "selected" , green `on` selectbg & bold)
86- ,(attrName " list" <> attrName " balance" , currentAttr & bold)
87- ,(attrName " list" <> attrName " balance" <> attrName " negative" , fg red)
88- ,(attrName " list" <> attrName " balance" <> attrName " positive" , fg black)
89- ,(attrName " list" <> attrName " balance" <> attrName " negative" <> attrName " selected" , red `on` selectbg & bold)
90- ,(attrName " list" <> attrName " balance" <> attrName " positive" <> attrName " selected" , select & bold)
91- ,(attrName " list" <> attrName " selected" , select)
92- -- ,(attrName "list" <> attrName "accounts" , white `on` brightGreen)
93- -- ,(attrName "list" <> attrName "selected" , black `on` brightYellow)
79+ -- the default theme, "light", defined in terms of the 240-color palette
80+ (" default" , attrMap (black8 `on` white8) [
81+ (attrName " border" , white8 `on` black8 & dim)
82+ , (attrName " border" <> attrName " bold" , currentAttr & bold)
83+ , (attrName " border" <> attrName " depth" , active8)
84+ , (attrName " border" <> attrName " filename" , currentAttr)
85+ , (attrName " border" <> attrName " key" , active8)
86+ , (attrName " border" <> attrName " minibuffer" , white8 `on` black8 & bold)
87+ , (attrName " border" <> attrName " query" , active8)
88+ , (attrName " border" <> attrName " selected" , active8)
89+ , (attrName " error" , fg red8)
90+ , (attrName " help" , white8 `on` black8 & dim)
91+ , (attrName " help" <> attrName " heading" , fg yellow8)
92+ , (attrName " help" <> attrName " key" , active8)
93+ , (attrName " list" <> attrName " amount" <> attrName " decrease" , fg red8)
94+ , (attrName " list" <> attrName " amount" <> attrName " decrease" <> attrName " selected" , moo)
95+ , (attrName " list" <> attrName " balance" , currentAttr & bold)
96+ , (attrName " list" <> attrName " balance" <> attrName " negative" , fg red8)
97+ , (attrName " list" <> attrName " balance" <> attrName " positive" , fg black8)
98+ , (attrName " list" <> attrName " balance" <> attrName " negative" <> attrName " selected" , moo)
99+ , (attrName " list" <> attrName " balance" <> attrName " positive" <> attrName " selected" , select8)
100+ , (attrName " list" <> attrName " selected" , select8)
94101 ])
95102
96103 ,(" greenterm" , attrMap (green `on` black) [
0 commit comments