code / tomo-unicode

Lines41.6K Text41.0K Tomo583
3 others 91
Markdown81 make7 INI3
(79 lines)
1 # Color themes for the table viewer
2 use btui
4 enum Theme(Dark, Light, None)
5 func guess(->Theme)
6 return Theme.Dark
8 func header(theme:Theme)
9 when theme is Dark
10 style(fg=Color256(232), bg=Blue)
11 is Light
12 style(fg=Color256(255), bg=Color256(237))
13 else pass
15 func box(theme:Theme)
16 when theme is Dark
17 style(bg=Color256(222), fg=Color256(94))
18 is Light
19 style(bg=Color256(54), fg=Color256(219))
20 else pass
22 func box_details(theme:Theme)
23 when theme is Dark
24 style(bg=Color256(222), fg=Color256(232))
25 is Light
26 style(bg=Color256(54), fg=Color256(255))
27 else pass
29 func row_codepoint(theme:Theme, highlighted=no)
30 when theme is Dark
31 style(fg=Yellow, bg=(if highlighted then Color.Color256(239) else Color.Color256(235)))
32 is Light
33 style(fg=Color256(18), bg=(if highlighted then Color.Color256(153) else Color.Color256(255)))
34 else pass
36 func row_character(theme:Theme, highlighted=no)
37 when theme is Dark
38 style(fg=Color256(255), bg=(if highlighted then Color.Color256(239) else Color.Color256(235)), bold=yes)
39 is Light
40 style(fg=Color256(232), bg=(if highlighted then Color.Color256(153) else Color.Color256(255)), bold=yes)
41 else pass
43 func row_description(theme:Theme, highlighted=no)
44 when theme is Dark
45 style(fg=Color256(195), bg=(if highlighted then Color.Color256(239) else Color.Color256(235)), bold=yes)
46 is Light
47 style(fg=Color256(52), bg=(if highlighted then Color.Color256(153) else Color.Color256(255)), bold=yes)
48 else pass
50 func search_label(theme:Theme, active:Bool)
51 when theme is Dark
52 style(bg=Color256((if active then Byte(69) else Byte(27))), fg=Color(232))
53 is Light
54 style(bg=Color256((if active then Byte(27) else Byte(69))), fg=Color(255))
55 else pass
57 func search_text(theme:Theme, active:Bool)
58 when theme is Dark
59 style(bg=Color256(255), fg=Color256((if active then Byte(232) else Byte(242))), bold=yes)
60 is Light
61 style(bg=Color256(255), fg=Color256((if active then Byte(232) else Byte(242))), bold=yes)
62 else pass
64 func message_theme(theme:Theme)
65 when theme is Dark
66 style(bg=Color256(252), fg=Color256(232), bold=yes)
67 is Light
68 style(bg=Color256(249), fg=Color256(232), bold=yes)
69 else pass
71 func scroll_bg(theme:Theme)
72 when theme is Dark, Light
73 style(bg=Color256(252), fg=Color256(232), bold=yes)
74 else pass
76 func scroll_bar(theme:Theme)
77 when theme is Dark, Light
78 style(bg=Color256(247))
79 else pass