From 52ee772d04de784df45918637bb7fb79e5d770bb Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 15 Jun 2022 12:30:22 -0500 Subject: [PATCH] feat: add dracula colorscheme --- yartsu/themes.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/yartsu/themes.py b/yartsu/themes.py index 19ededd..fd39f26 100644 --- a/yartsu/themes.py +++ b/yartsu/themes.py @@ -1,5 +1,6 @@ from collections import namedtuple +from rich.color import parse_rgb_hex from rich.terminal_theme import ( DIMMED_MONOKAI, MONOKAI, @@ -11,6 +12,38 @@ from rich.terminal_theme import ( Colors = namedtuple("Colors", "black, red, green, yellow, blue, magenta, cyan, white") Theme = namedtuple("Theme", "background, foreground, colors, bright_colors") +dracula = Theme( + background=parse_rgb_hex('282a36'), + foreground=parse_rgb_hex('f8f8f2'), + colors=Colors( + black=parse_rgb_hex('21222c'), + cyan=parse_rgb_hex('8be9fd'), + yellow=parse_rgb_hex('f1fa8c'), + blue=parse_rgb_hex('bd93f9'), + red=parse_rgb_hex('ff5555'), + green=parse_rgb_hex('50fa7b'), + magenta=parse_rgb_hex('ff79c6'), + white=parse_rgb_hex('f8f8f2'), + ), + bright_colors=Colors( + black=parse_rgb_hex('6272a4'), + cyan=parse_rgb_hex('a4ffff'), + red=parse_rgb_hex('ff6e6e'), + yellow=parse_rgb_hex('ffffa5'), + blue=parse_rgb_hex('d6acff'), + green=parse_rgb_hex('69ff94'), + magenta=parse_rgb_hex('ff92df'), + white=parse_rgb_hex('ffffff'), + ), +) + +DRACULA = TerminalTheme( + dracula.background, + dracula.foreground, + dracula.colors, + dracula.bright_colors, +) + cat_mocha = Theme( background=(30, 30, 46), foreground=(198, 208, 245), @@ -137,6 +170,7 @@ THEMES = { "cat_frappe": CAT_FRAPPE, "cat_macchiato": CAT_MACCHIATO, "cat_latte": CAT_LATTE, + "dracula": DRACULA, "monokai": MONOKAI, "dimmed_monokai": DIMMED_MONOKAI, "night_owlish": NIGHT_OWLISH,