mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-20 19:19:41 +03:00
Fix index colors
This commit is contained in:
parent
2d9ae7c01f
commit
98482c745a
@ -119,13 +119,15 @@ def validate_font(opts: Options):
|
||||
|
||||
|
||||
def build_ansi_color_tables(opts: Options) -> Tuple[dict, dict]:
|
||||
fg = {30 + i: getattr(opts, 'color{}'.format(i)) for i in range(8)}
|
||||
def col(i):
|
||||
return QColor(getattr(opts, 'color{}'.format(i)))
|
||||
fg = {30 + i: col(i) for i in range(8)}
|
||||
fg[39] = opts.foreground
|
||||
fg.update({90 + i: getattr(opts, 'color{}'.format(i + 8)) for i in range(8)})
|
||||
fg.update({90 + i: col(i + 8) for i in range(8)})
|
||||
fg[99] = opts.foreground_bold
|
||||
bg = {40 + i: getattr(opts, 'color{}'.format(i)) for i in range(8)}
|
||||
bg = {40 + i: col(i) for i in range(8)}
|
||||
bg[49] = opts.background
|
||||
bg.update({100 + i: getattr(opts, 'color{}'.format(i + 8)) for i in range(8)})
|
||||
bg.update({100 + i: col(i + 8) for i in range(8)})
|
||||
build_ansi_color_tables.fg, build_ansi_color_tables.bg = fg, bg
|
||||
build_ansi_color_tables(defaults)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user