gitstack 5.3.0

Git history viewer with insights - Author stats, file heatmap, code ownership
Documentation
//! gitstack theme definitions
//!
//! A refined color palette inspired by Catppuccin Mocha.
//! All UI elements reference constants from this module.

use ratatui::style::Color;

// =============================================================================
// Text hierarchy
// =============================================================================

/// Primary text (commit messages, selected items, etc.)
pub const TEXT: Color = Color::Rgb(205, 214, 244);

/// Secondary text (author names, supplementary info)
pub const SUBTEXT1: Color = Color::Rgb(166, 173, 200);

/// Tertiary text (separators, disabled items)
pub const SUBTEXT0: Color = Color::Rgb(127, 132, 156);

/// Lowest contrast (faint dividers, hints)
pub const OVERLAY0: Color = Color::Rgb(108, 112, 134);

// =============================================================================
// Surfaces (backgrounds)
// =============================================================================

/// Overlay background
pub const SURFACE0: Color = Color::Rgb(30, 30, 46);

/// Selected line background
pub const SURFACE1: Color = Color::Rgb(36, 39, 58);

/// Hover/focus background
pub const SURFACE2: Color = Color::Rgb(49, 50, 68);

// =============================================================================
// Accent colors
// =============================================================================

/// Lavender: panel borders, titles
pub const LAVENDER: Color = Color::Rgb(180, 190, 254);

/// Blue: branch names, links
pub const BLUE: Color = Color::Rgb(137, 180, 250);

/// Sapphire: info display, commit types
pub const SAPPHIRE: Color = Color::Rgb(116, 199, 236);

/// Sky: main branch graph
pub const SKY: Color = Color::Rgb(137, 220, 235);

/// Teal: success, ahead
pub const TEAL: Color = Color::Rgb(148, 226, 213);

/// Green: added lines, ahead badge
pub const GREEN: Color = Color::Rgb(166, 227, 161);

/// Yellow: selection highlight, warnings
pub const YELLOW: Color = Color::Rgb(249, 226, 175);

/// Peach: important, hash display
pub const PEACH: Color = Color::Rgb(250, 179, 135);

/// Maroon: hot paths, dirty files
pub const MAROON: Color = Color::Rgb(235, 160, 172);

/// Red: deleted lines, behind
pub const RED: Color = Color::Rgb(243, 139, 168);

/// Mauve: merges, signals, scores
pub const MAUVE: Color = Color::Rgb(203, 166, 247);

/// Pink: decorative, flamingo
pub const PINK: Color = Color::Rgb(245, 194, 231);

/// Flamingo: auxiliary decoration
pub const FLAMINGO: Color = Color::Rgb(242, 205, 205);

// =============================================================================
// Semantic colors (purpose-based aliases)
// =============================================================================

/// Border color (normal)
pub const BORDER: Color = OVERLAY0;

/// Selected cursor foreground
pub const SELECTED_FG: Color = YELLOW;

/// Diff addition
pub const DIFF_ADD: Color = GREEN;

/// Diff deletion
pub const DIFF_DEL: Color = RED;

/// File status: Added
pub const FILE_ADDED: Color = GREEN;

/// File status: Modified
pub const FILE_MODIFIED: Color = YELLOW;

/// File status: Deleted
pub const FILE_DELETED: Color = RED;

/// File status: Renamed
pub const FILE_RENAMED: Color = BLUE;

/// Key badge background
pub const KEY_BADGE_BG: Color = Color::Rgb(49, 50, 68);

/// Key badge foreground
pub const KEY_BADGE_FG: Color = LAVENDER;

/// Key badge description text
pub const KEY_BADGE_DESC: Color = SUBTEXT1;

/// Separator line
pub const SEPARATOR: Color = Color::Rgb(69, 71, 90);

// =============================================================================
// Dashboard-style panel colors
// =============================================================================

/// Dashboard: active panel border (green)
pub const PANEL_BORDER_ACTIVE: Color = GREEN;

/// Dashboard: inactive panel border
pub const PANEL_BORDER_INACTIVE: Color = OVERLAY0;

/// Dashboard: active panel title (green bold)
pub const PANEL_TITLE_ACTIVE: Color = GREEN;

/// Dashboard: inactive panel title
pub const PANEL_TITLE_INACTIVE: Color = SUBTEXT0;

/// Dashboard: selected line background color (blue-toned)
pub const SELECTED_LINE_BG: Color = Color::Rgb(45, 55, 90);

/// Dashboard: unfocused selected line background color (faint)
pub const SELECTED_LINE_BG_INACTIVE: Color = Color::Rgb(35, 40, 60);

/// Dashboard: footer key badge color
pub const FOOTER_KEY: Color = SAPPHIRE;

/// Dashboard: footer description text color
pub const FOOTER_DESC: Color = SUBTEXT1;

// =============================================================================
// Graph palette (12 colors -- soft and harmonious scheme)
// =============================================================================

/// Color palette used for graphs (12 colors)
///
/// Color scheme balancing visibility and aesthetics:
/// - Index 0: main branch (Sky -- translucent cyan)
/// - Index 1-11: evenly distributed across different hues
pub const GRAPH_PALETTE: [Color; 12] = [
    SKY,      // 0: main branch
    BLUE,     // 1: blue
    TEAL,     // 2: teal
    MAUVE,    // 3: mauve
    PEACH,    // 4: peach
    PINK,     // 5: pink
    GREEN,    // 6: green
    LAVENDER, // 7: lavender
    MAROON,   // 8: maroon
    YELLOW,   // 9: yellow
    SAPPHIRE, // 10: sapphire
    FLAMINGO, // 11: flamingo
];