Debian Codegraph @

src/pyj/read_book/chrome.pyj

raw
1 # vim:fileencoding=utf-8
2 # License: GPL v3 Copyright: 2026, Kovid Goyal <kovid at kovidgoyal.net>
3 from __python__ import hash_literals
4
5 from book_list.theme import get_color
6 from dom import set_css
7
8
9 def viewer_chrome_colors():
10 return {
11 'background': get_color('window-background'),
12 'foreground': get_color('window-foreground'),
13 }
14
15
16 def apply_viewer_chrome_colors(elem):
17 colors = viewer_chrome_colors()
18 set_css(elem, background_color=colors.background, color=colors.foreground)