Skip to content

theme

Colors for the Reloaded terminal UI.

Every value comes from the shared Color palette (Tailwind) and each role mirrors a dark mode token in the Dojo's theme.css, so the terminal and the browser read as the same product. Pick a role from here instead of a color name or a hex value.

CANVAS module-attribute

Python
CANVAS = SLATE_900

SURFACE module-attribute

Python
SURFACE = SLATE_800

Panels and bars sitting on the canvas.

SURFACE_INSET module-attribute

Python
SURFACE_INSET = SLATE_950

Deeply nested inputs.

LINE module-attribute

Python
LINE = SLATE_700

Structural borders and dividers.

SCRIM module-attribute

Python
SCRIM = SLATE_950

Backdrop behind a modal.

INK_STRONG module-attribute

Python
INK_STRONG = SLATE_200

Emphasized text.

INK_BODY module-attribute

Python
INK_BODY = SLATE_300

INK_SECONDARY module-attribute

Python
INK_SECONDARY = SLATE_400

Labels and de-emphasized text.

INK_MUTED module-attribute

Python
INK_MUTED = SLATE_500

Timestamps, disabled and empty states.

ACCENT module-attribute

Python
ACCENT = CYAN_500
Python
LINK = CYAN_400

The accent step used for text on a dark background.

ON_ACCENT module-attribute

Python
ON_ACCENT = SLATE_950

Readable text over a filled accent, success, warning, or danger surface.

MOJO_ANSI_THEME module-attribute

Python
MOJO_ANSI_THEME = TerminalTheme(
    _rgb(CANVAS),
    _rgb(INK_BODY),
    normal=[
        _rgb(c)
        for c in (
            LINE,
            DANGER,
            SUCCESS,
            WARNING,
            INFO,
            SECONDARY,
            ACCENT,
            INK_BODY,
        )
    ],
    bright=[
        _rgb(c)
        for c in (
            INK_MUTED,
            ROSE_400,
            EMERALD_400,
            AMBER_400,
            INDIGO_400,
            VIOLET_400,
            LINK,
            SLATE_50,
        )
    ],
)

What the 16 named terminal colors (green, bold red, cyan, and so on) mean inside the UI. This is what lets markup like [bold green] in controller messages and in user code come out in the Mojo palette.

MOJO_THEME module-attribute

Python
MOJO_THEME = Theme(
    name="mojo",
    primary=ACCENT,
    secondary=SECONDARY,
    accent=LINK,
    warning=WARNING,
    error=DANGER,
    success=SUCCESS,
    foreground=INK_BODY,
    background=CANVAS,
    surface=SURFACE,
    panel=SURFACE,
    dark=True,
    variables={
        "border": ACCENT,
        "border-blurred": LINE,
        "input-cursor-background": ACCENT,
        "input-cursor-foreground": ON_ACCENT,
        "input-selection-background": f"{ACCENT} 35%",
        "footer-background": SURFACE,
        "footer-key-foreground": LINK,
        "footer-description-foreground": INK_SECONDARY,
        "scrollbar": SLATE_600,
        "scrollbar-hover": INK_MUTED,
        "scrollbar-active": ACCENT,
        "scrollbar-background": CANVAS,
        "scrollbar-corner-color": CANVAS,
        "link-color": LINK,
        "surface-inset": SURFACE_INSET,
        "scrim": SCRIM,
    },
)

The Textual theme, registered and selected by ReloadedApp.