From c904bf00c010e9e54a59d05864cf09541cd515c9 Mon Sep 17 00:00:00 2001 From: NSPC911 <87571998+NSPC911@users.noreply.github.com> Date: Fri, 2 Jan 2026 00:02:17 +0800 Subject: [PATCH] feat(themes): add atom-one-dark and atom-one-light --- docs/guide/design.md | 10 ++++++++++ src/textual/theme.py | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/docs/guide/design.md b/docs/guide/design.md index 08fc2bb42b..52876a4107 100644 --- a/docs/guide/design.md +++ b/docs/guide/design.md @@ -29,6 +29,16 @@ Click on the tabs below to see how themes can change the appearance of an app. ```{.textual path="docs/examples/themes/todo_app.py" press="ctrl+t,ctrl+t,ctrl+t,ctrl+t"} ``` +=== "atom-one-dark" + + ```{.textual path="docs/examples/themes/todo_app.py" press="ctrl+t,ctrl+t,ctrl+t,ctrl+t,ctrl+t"} + ``` + +=== "atom-one-light" + + ```{.textual path="docs/examples/themes/todo_app.py" press="ctrl+t,ctrl+t,ctrl+t,ctrl+t,ctrl+t,ctrl+t"} + ``` + ## Changing the theme The theme can be changed at runtime via the [Command Palette](./command_palette.md) (++ctrl+p++). diff --git a/src/textual/theme.py b/src/textual/theme.py index d80aaacd71..d1247417b0 100644 --- a/src/textual/theme.py +++ b/src/textual/theme.py @@ -376,6 +376,40 @@ def to_color_system(self) -> ColorSystem: "block-cursor-background": "#575279", }, ), + "atom-one-dark": Theme( + name="atom-one-dark", + primary="#61AFEF", + secondary="#C678DD", + warning="#DEB25B", + error="#F06262", + success="#62F062", + accent="#A378C2", + foreground="#ABB2BF", + background="#282C34", + surface="#3B414D", + panel="#4F5666", + boost=None, + dark=True, + luminosity_spread=0.15, + text_alpha=0.95, + ), + "atom-one-light": Theme( + name="atom-one-light", + primary="#4078F2", + secondary="#A626A4", + warning="#D8D938", + error="#F23F3F", + success="#6CF23F", + accent="#bf9232", + foreground="#383A42", + background="#FAFAFA", + surface="#E0E0E0", + panel="#CCCCCC", + boost=None, + dark=False, + luminosity_spread=0.15, + text_alpha=0.95, + ), }