mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Fix index colors
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user