diff --git a/textual_terminal/_terminal.py b/textual_terminal/_terminal.py index 4df7816..5418371 100644 --- a/textual_terminal/_terminal.py +++ b/textual_terminal/_terminal.py @@ -31,10 +31,8 @@ from textual.widget import Widget from textual import events -from textual.app import DEFAULT_COLORS from textual import log -from textual.design import ColorSystem class TerminalPyteScreen(pyte.Screen): @@ -370,12 +368,7 @@ def detect_color(self, color: str) -> str: def detect_textual_colors(self) -> dict: """Returns the currently used colors of textual depending on dark-mode.""" - if self.app.dark: - color_system: ColorSystem = DEFAULT_COLORS["dark"] - else: - color_system: ColorSystem = DEFAULT_COLORS["light"] - - return color_system.generate() + return self.app.current_theme.to_color_system().generate() def initial_display(self) -> TerminalDisplay: """Returns the display when initially creating the terminal or clearing it."""