Skip to content

Let colours vary by light and dark appearance, and ship the built-in look as a theme #29

Closed

Description

@Seb-GRAF

Problem

  • In dark mode a theme's dark profile beats your own tokens. Profiles apply after the main file (Sources/StableBar/ConfigurationLoader.swift:241), so with Slate selected, "tokens": { "text": "#c2410c" } in the main file colours text in light mode and reverts to Slate's text colour in dark mode. README "Theme packages" says your settings override the theme's.
  • A colour is one fixed value. Only unset colours follow the system appearance (systemColor, Sources/StableBar/Configuration.swift:146), so any colour you set, in JSON or with a Customize colour well, stops following it. With the built-in look, setting only a dark background gives dark text on it in light mode, since the text colour still follows the system.
  • Light and dark variants need profiles, and a main file with its own profiles drops the theme's (Merge profiles by name across includes, packages and the main file #24).
  • The built-in look isn't a theme. It's hard-coded (WidgetStyle.light and .dark, Configuration.swift:140) and defines none of the nine shared tokens, so @token.textMuted is an error without a theme. No theme ships with the app, so setup and Customize offer only Built-in until you install a package from a folder.
  • Setup's Light and Dark write five fixed colours into defaults (Sources/StableBar/SetupPreferences.swift:47), which beat any theme chosen later in Customize (Choosing a theme in Customize keeps colours from setup and the starter configuration #28).

Proposal

  1. A colour is "#RRGGBB[AA]" or { "light": "…", "dark": "…" }, drawn as a dynamic NSColor like unset colours today. Tokens substitute whole values, so "@token.text" carries a pair unchanged.
  2. Themes define pairs instead of appearance profiles. Profiles stay for power, displays and apps.
  3. Ship the built-in look as a bundled theme that defines the nine tokens, used when theme is absent, plus two or three more such as Slate. Bundled themes need no install.
  4. Replace setup's Light and Dark colours with one key that forces a variant, for example "bar": { "appearance": "dark" }, which profiles' when.appearance also follows.
  5. Update the schema, README "Layout and style" and "Theme packages", and examples/themes/slate.

Theme packages have only shipped in v0.5.0-beta.31, so their format can change before a stable release.

Possible today

Partly. A theme's dark profile switches its tokens with the system while the main file has no profiles. Setting a property directly, such as defaults.accent, beats the theme in both modes but no longer follows light and dark.

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    enhancement
    on Oct 16, 2026
  2. stablebar-releases commented on Oct 21, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.5.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions