Skip to content

Theming and custom skins #56

Description

@syedazeez337

Summary

Add built-in color themes and user-customizable skins via config.toml.

Motivation

k9s has extensive theming. Users want their tools to match their terminal aesthetic. This is a low-effort, high-satisfaction feature.

Requirements

Built-in Themes

  • dark (default — current colors)
  • light — optimized for light terminal backgrounds
  • dracula — popular dark theme
  • nord — muted Nordic palette
  • solarized — Solarized dark/light

Config

[theme]
name = "dark"                     # built-in theme name
# OR custom overrides:
# status_healthy = "green"
# status_warning = "yellow"
# status_critical = "red"
# kind_pod = "green"
# kind_service = "blue"
# kind_deployment = "yellow"
# header_fg = "white"
# header_bg = "black"
# selected_bg = "blue"

Implementation

  • Create src/theme.rs module
  • Define Theme struct with all color fields
  • Built-in themes as const/static instances
  • Custom overrides merge on top of base theme
  • Thread theme through to items.rs display functions and main.rs header

Color Format

  • Named colors: red, green, blue, yellow, cyan, magenta, white, black, gray
  • 256-color: color(123)
  • RGB: #ff5733
  • Map to ratatui::style::Color

Acceptance Criteria

  • 5 built-in themes selectable via config
  • Custom color overrides work
  • Theme applied to all UI elements (list, header, preview, status)
  • Colors render correctly on dark and light terminals
  • Tests: theme loading and color mapping

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-lowPolish and quality of lifeenhancementNew feature or requestphase-4-polishEnterprise features and polish

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions