Skip to content

Make theme customizable #193

Closed
Closed

Description

@LucasPickering

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

It'd be nice to customize the color of the TUI.

Describe the solution you'd like
A clear and concise description of what you want to happen

Configurable theme section of config.yml. To start with, it'll just have two fields:

theme:
  primary_color: yellow
  error_color: #0000ff

ratatui::Color deserializes from both HTML hex strings and color names automatically, so we don't even need to implement that.

We may also want to add a field secondary_color, which would be used for things like the template color. Could also punt that to the future though.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered

We could make the entire style book customizable (Style does implement Deserialize!), but I think that would be way too complex and also opens us up to maintaining the entire set of styles as part of the external API. Making a few core settings customizable, then deriving styles from that, I think is a much better solution.

Additional context
Add any other context or screenshots about the feature request here

If anyone wants to pick this up, the work involved is:

  • Split Theme into two structs (theme.rs):
    • A small simple one that defines what's configurable in the config, which I would have keep the name Theme
    • A complex one with all the individual styles, which I would call Styles. This would be derived from the theme, and stored in TuiContext
  • Add a new field theme: Theme to the config (config.rs)
  • Document theme field in the config docs

Activity

  1. added
    featureNew behavior to enable things that were previously not possible
    on May 1, 2024
  2. added 3 commits that reference this issue on May 4, 2024
    ce56ac9
    9738f4f
    93f26cf
  3. added a commit that references this issue on May 5, 2024
    c0decde
  4. added a commit that references this issue on May 6, 2024
  5. added a commit that references this issue on May 11, 2026
  6. added a commit that references this issue on May 14, 2026
  7. added a commit that references this issue on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

featureNew behavior to enable things that were previously not possiblegood first issueGood for newcomers

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions