Skip to content

Commit

Permalink
Fixing theme weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Oct 16, 2024
1 parent 55d84c0 commit 6583c77
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 0 additions & 2 deletions src/textual/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ def luminosity_range(spread: float) -> Iterable[tuple[str, float]]:
shade_color = color.lighten(luminosity_delta)
colors[f"{name}{shade_name}"] = shade_color.hex

print(f"{name}{shade_name}: {colors[f'{name}{shade_name}']}")

if foreground.ansi is None:
colors["text"] = "auto 87%"
colors["text-muted"] = "auto 60%"
Expand Down
25 changes: 13 additions & 12 deletions src/textual/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,16 @@ def to_color_system(self) -> ColorSystem:
),
"dracula": Theme(
name="dracula",
primary="#BD93F9", # Purple
secondary="#6272A4", # Comment
warning="#FFB86C", # Orange
error="#FF5555", # Red
success="#50FA7B", # Green
accent="#FF79C6", # Pink
background="#282A36", # Background
surface="#44475A", # Current Line
panel="#44475A", # Current Line
primary="#BD93F9",
secondary="#6272A4",
warning="#FFB86C",
error="#FF5555",
success="#50FA7B",
accent="#FF79C6",
background="#282A36",
surface="#44475A",
panel="#44475A",
foreground="#F8F8F2",
dark=True,
),
"solarized-dark": Theme(
Expand Down Expand Up @@ -143,10 +144,10 @@ def to_color_system(self) -> ColorSystem:
error="#fb4934",
success="#b8bb26",
accent="#fabd2f",
foreground="#EBDAB4",
foreground="#fbf1c7",
background="#282828",
surface="#3D3836",
panel="#504946",
surface="#3c3836",
panel="#504945",
dark=True,
),
"tokyo-night": Theme(
Expand Down
1 change: 1 addition & 0 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ class Widget(DOMNode):
link-background-hover: $secondary;
link-color-hover: $text;
link-style-hover: bold not underline;
color: $foreground;
background: transparent;
}
"""
Expand Down

0 comments on commit 6583c77

Please sign in to comment.