[colorschemes] add more colors to the ansi_colors array

This commit is contained in:
Dmytro Meleshko 2019-09-14 22:39:13 +03:00
parent 8fb79293c8
commit b667b31639
5 changed files with 8 additions and 25 deletions

View file

@ -32,25 +32,8 @@ selection_bg = base16_colors[0x2]
selection_fg = fg
ansi_colors = [
base16_colors[i]
for i in [
0x0,
0x8,
0xB,
0xA,
0xD,
0xE,
0xC,
0x5,
0x3,
0x8,
0xB,
0xA,
0xD,
0xE,
0xC,
0x7,
]
base16_colors[int(i, 16)]
for i in "0 8 B A D E C 5 3 8 B A D E C 7 9 F 1 2 4 6".split()
]
link_color = ansi_colors[12]
link_color = ansi_colors[0xC]

View file

@ -40,7 +40,7 @@ print_color("Cursor", theme.cursor_bg)
print_color("Cursor Text", theme.cursor_fg)
print_color("Selection Color", theme.selection_bg)
print_color("Selected Text Color", theme.selection_fg)
for index, color in enumerate(theme.ansi_colors):
for index, color in enumerate(theme.ansi_colors[:16]):
print_color("Ansi " + str(index), color)
print_color("Link", theme.link_color)

View file

@ -13,7 +13,7 @@ print_color("cursor", theme.cursor_bg)
print_color("cursor_text_color", theme.cursor_fg)
print_color("selection_background", theme.selection_bg)
print_color("selection_foreground", theme.selection_fg)
for index, color in enumerate(theme.ansi_colors):
for index, color in enumerate(theme.ansi_colors[:16]):
print_color("color" + str(index), color)
print_color("url_color", theme.link_color)
print_color("active_border_color", theme.ansi_colors[2])

View file

@ -6,7 +6,7 @@ print("let dotfiles_colorscheme_name = '{}'".format(theme.name))
print("let dotfiles_colorscheme_base16_name = '{}'".format(theme.base16_name))
print("let dotfiles_colorscheme_base16_colors = [")
gui_to_cterm_mapping = [0, 18, 19, 8, 20, 7, 21, 15, 1, 16, 3, 2, 6, 4, 5, 17]
for colors_pair in zip(theme.base16_colors, gui_to_cterm_mapping):
for colors_pair in zip(theme.base16_colors[:16], gui_to_cterm_mapping):
print("\\ {{'gui': '{}', 'cterm': '{:>02}'}},".format(*colors_pair))
print("\\ ]")
@ -17,5 +17,5 @@ def print_terminal_color(key_name, color):
print_terminal_color("background", theme.bg)
print_terminal_color("foreground", theme.fg)
for index, color in enumerate(theme.ansi_colors):
for index, color in enumerate(theme.ansi_colors[:16]):
print_terminal_color(str(index), color)

View file

@ -10,5 +10,5 @@ def print_color(key_name, color):
print_color("background", theme.bg)
print_color("foreground", theme.fg)
print_color("cursor", theme.cursor_bg)
for index, color in enumerate(theme.ansi_colors):
for index, color in enumerate(theme.ansi_colors[:16]):
print_color("color" + str(index), color)