remove accent3

This commit is contained in:
Will McGugan
2022-04-05 17:10:04 +01:00
parent ba707c96be
commit 82c0bd877c
3 changed files with 6 additions and 15 deletions

View File

@@ -43,8 +43,8 @@ App > Screen {
} }
#header { #header {
color: $on-primary; color: $on-primary-darken2;
background: $primary; background: $primary-darken2;
height: 3; height: 3;
border: hkey $primary-darken3; border: hkey $primary-darken3;

View File

@@ -118,8 +118,6 @@ class App(DOMNode):
warning="#ffa000", warning="#ffa000",
error="#C62828", error="#C62828",
success="#558B2F", success="#558B2F",
accent1="#1976D2",
accent3="#512DA8",
) )
self.stylesheet = Stylesheet(variables=self.get_css_variables()) self.stylesheet = Stylesheet(variables=self.get_css_variables())
@@ -140,7 +138,7 @@ class App(DOMNode):
title: Reactive[str] = Reactive("Textual") title: Reactive[str] = Reactive("Textual")
sub_title: Reactive[str] = Reactive("") sub_title: Reactive[str] = Reactive("")
background: Reactive[str] = Reactive("black") background: Reactive[str] = Reactive("black")
dark = Reactive(True) dark = Reactive(False)
def get_css_variables(self) -> dict[str, str]: def get_css_variables(self) -> dict[str, str]:
variables = self.design.generate(self.dark) variables = self.design.generate(self.dark)

View File

@@ -51,7 +51,6 @@ class ColorSystem:
"success", "success",
"accent1", "accent1",
"accent2", "accent2",
"accent3",
] ]
def __init__( def __init__(
@@ -63,7 +62,6 @@ class ColorSystem:
success: str | None = None, success: str | None = None,
accent1: str | None = None, accent1: str | None = None,
accent2: str | None = None, accent2: str | None = None,
accent3: str | None = None,
background: str | None = None, background: str | None = None,
surface: str | None = None, surface: str | None = None,
): ):
@@ -74,7 +72,6 @@ class ColorSystem:
self._success = success self._success = success
self._accent1 = accent1 self._accent1 = accent1
self._accent2 = accent2 self._accent2 = accent2
self._accent3 = accent3
self._background = background self._background = background
self._surface = surface self._surface = surface
@@ -88,7 +85,6 @@ class ColorSystem:
success = ColorProperty() success = ColorProperty()
accent1 = ColorProperty() accent1 = ColorProperty()
accent2 = ColorProperty() accent2 = ColorProperty()
accent3 = ColorProperty()
surface = ColorProperty() surface = ColorProperty()
background = ColorProperty() background = ColorProperty()
@@ -130,7 +126,7 @@ class ColorSystem:
success = self.success or secondary success = self.success or secondary
accent1 = self.accent1 or primary accent1 = self.accent1 or primary
accent2 = self.accent2 or secondary accent2 = self.accent2 or secondary
accent3 = self.accent3 or accent2
background = self.background or (BLACK if dark else Color.parse("#f5f5f5")) background = self.background or (BLACK if dark else Color.parse("#f5f5f5"))
surface = self.surface or ( surface = self.surface or (
Color.parse("#121212") if dark else Color.parse("#efefef") Color.parse("#121212") if dark else Color.parse("#efefef")
@@ -166,7 +162,6 @@ class ColorSystem:
("success", success), ("success", success),
("accent1", accent1), ("accent1", accent1),
("accent2", accent2), ("accent2", accent2),
("accent3", accent3),
] ]
# Colors names that have a dark varient # Colors names that have a dark varient
@@ -221,13 +216,11 @@ class ColorSystem:
if __name__ == "__main__": if __name__ == "__main__":
color_system = ColorSystem( color_system = ColorSystem(
primary="#00838f", primary="#005EA8",
secondary="#00796b", secondary="#F59402",
warning="#ffa000", warning="#ffa000",
error="#C62828", error="#C62828",
success="#558B2F", success="#558B2F",
accent1="#1976D2",
accent3="#512DA8",
) )
from rich import print from rich import print