Skip to content

Support for custom themes using 0-255 terminal color codes #19

@net

Description

@net

I would love to be able to define a custom theme using the standard terminal color codes 0-255.

It's not uncommon to configure colors 0-15 to be a specific theme, and then have all your CLI/TUI tools use those colors. This way you don't have to set up the same hex codes in every tool, and you get light/dark theme switching for free (I know opencode has support for light/dark variants based on terminal background, but almost no TUI tool does that).

I personally configure the color codes 0-20 so I can have more colors for things like diff backgrounds, so support for any code 0-255 would be appreciated (and standard).

This would also help support the rare terminal environment that only has 256 color capability.

Example:

{
  "data": {},
  "tui": {
    "theme": "custom",
    "customTheme": {
      "background": 0,
      "foreground": 7,
      "primary": 2,
      "secondary": 3,
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions