2019-08-26 11:54:06 +00:00
|
|
|
#!/usr/bin/env python3
|
2019-08-24 16:05:09 +00:00
|
|
|
|
|
|
|
import _theme as theme
|
|
|
|
|
2019-09-05 21:37:09 +00:00
|
|
|
print("let dotfiles_colorscheme_name = '{}'".format(theme.name))
|
|
|
|
print("let dotfiles_colorscheme_base16_name = '{}'".format(theme.base16_name))
|
|
|
|
print("let dotfiles_colorscheme_base16_colors = [")
|
2019-08-24 16:05:09 +00:00
|
|
|
gui_to_cterm_mapping = [0, 18, 19, 8, 20, 7, 21, 15, 1, 16, 3, 2, 6, 4, 5, 17]
|
2019-09-14 19:39:13 +00:00
|
|
|
for colors_pair in zip(theme.base16_colors[:16], gui_to_cterm_mapping):
|
2019-08-24 16:05:09 +00:00
|
|
|
print("\\ {{'gui': '{}', 'cterm': '{:>02}'}},".format(*colors_pair))
|
|
|
|
print("\\ ]")
|
|
|
|
|
|
|
|
|
|
|
|
def print_terminal_color(key_name, color):
|
|
|
|
print("let terminal_color_{} = '{}'".format(key_name, color))
|
|
|
|
|
|
|
|
|
|
|
|
print_terminal_color("background", theme.bg)
|
|
|
|
print_terminal_color("foreground", theme.fg)
|
2019-09-14 19:39:13 +00:00
|
|
|
for index, color in enumerate(theme.ansi_colors[:16]):
|
2019-08-24 16:05:09 +00:00
|
|
|
print_terminal_color(str(index), color)
|