Files
Cagire/crates/ratatui/src/theme/eden.rs
2026-02-06 00:19:16 +01:00

283 lines
9.0 KiB
Rust

use super::*;
use ratatui::style::Color;
pub fn theme() -> ThemeColors {
let bg = Color::Rgb(8, 12, 8);
let surface = Color::Rgb(16, 24, 16);
let surface2 = Color::Rgb(24, 32, 24);
let border = Color::Rgb(32, 48, 32);
let fg = Color::Rgb(200, 216, 192);
let fg_dim = Color::Rgb(122, 144, 112);
let fg_muted = Color::Rgb(64, 88, 56);
let green = Color::Rgb(64, 192, 64);
let bright_green = Color::Rgb(96, 224, 96);
let dark_green = Color::Rgb(48, 128, 48);
let cyan = Color::Rgb(80, 168, 144);
let yellow = Color::Rgb(160, 160, 64);
let red = Color::Rgb(192, 80, 64);
let orange = Color::Rgb(176, 128, 48);
let blue = Color::Rgb(80, 128, 160);
let purple = Color::Rgb(128, 104, 144);
ThemeColors {
ui: UiColors {
bg,
bg_rgb: (8, 12, 8),
text_primary: fg,
text_muted: fg_dim,
text_dim: fg_muted,
border,
header: green,
unfocused: fg_muted,
accent: green,
surface,
},
status: StatusColors {
playing_bg: Color::Rgb(14, 30, 14),
playing_fg: bright_green,
stopped_bg: Color::Rgb(36, 16, 14),
stopped_fg: red,
fill_on: green,
fill_off: dark_green,
fill_bg: surface,
},
selection: SelectionColors {
cursor_bg: green,
cursor_fg: bg,
selected_bg: Color::Rgb(20, 40, 20),
selected_fg: bright_green,
in_range_bg: Color::Rgb(16, 30, 16),
in_range_fg: fg,
cursor: green,
selected: Color::Rgb(20, 40, 20),
in_range: Color::Rgb(16, 30, 16),
},
tile: TileColors {
playing_active_bg: Color::Rgb(16, 38, 16),
playing_active_fg: bright_green,
playing_inactive_bg: Color::Rgb(28, 36, 14),
playing_inactive_fg: yellow,
active_bg: Color::Rgb(14, 28, 26),
active_fg: cyan,
inactive_bg: surface,
inactive_fg: fg_dim,
active_selected_bg: Color::Rgb(22, 36, 28),
active_in_range_bg: Color::Rgb(16, 28, 20),
link_bright: [
(64, 192, 64),
(80, 168, 144),
(160, 160, 64),
(80, 128, 160),
(192, 80, 64),
],
link_dim: [
(14, 38, 14),
(16, 34, 28),
(32, 32, 14),
(16, 26, 32),
(38, 16, 14),
],
},
header: HeaderColors {
tempo_bg: Color::Rgb(26, 22, 30),
tempo_fg: purple,
bank_bg: Color::Rgb(16, 26, 32),
bank_fg: blue,
pattern_bg: Color::Rgb(14, 28, 26),
pattern_fg: cyan,
stats_bg: surface,
stats_fg: fg_dim,
},
modal: ModalColors {
border: green,
border_accent: bright_green,
border_warn: yellow,
border_dim: fg_muted,
confirm: red,
rename: green,
input: cyan,
editor: green,
preview: fg_muted,
},
flash: FlashColors {
error_bg: Color::Rgb(40, 16, 14),
error_fg: red,
success_bg: Color::Rgb(14, 32, 14),
success_fg: bright_green,
info_bg: surface,
info_fg: fg,
},
list: ListColors {
playing_bg: Color::Rgb(14, 32, 14),
playing_fg: bright_green,
staged_play_bg: Color::Rgb(26, 22, 30),
staged_play_fg: purple,
staged_stop_bg: Color::Rgb(40, 16, 14),
staged_stop_fg: red,
edit_bg: Color::Rgb(14, 28, 26),
edit_fg: cyan,
hover_bg: surface2,
hover_fg: fg,
muted_bg: Color::Rgb(10, 14, 10),
muted_fg: fg_muted,
soloed_bg: Color::Rgb(30, 30, 14),
soloed_fg: yellow,
},
link_status: LinkStatusColors {
disabled: red,
connected: bright_green,
listening: yellow,
},
syntax: SyntaxColors {
gap_bg: bg,
executed_bg: Color::Rgb(14, 24, 14),
selected_bg: Color::Rgb(20, 40, 16),
emit: (fg, Color::Rgb(20, 34, 20)),
number: (yellow, Color::Rgb(30, 30, 12)),
string: (bright_green, Color::Rgb(16, 32, 16)),
comment: (fg_muted, bg),
keyword: (red, Color::Rgb(38, 18, 14)),
stack_op: (blue, Color::Rgb(16, 26, 32)),
operator: (green, Color::Rgb(14, 36, 14)),
sound: (cyan, Color::Rgb(16, 30, 28)),
param: (purple, Color::Rgb(26, 22, 28)),
context: (orange, Color::Rgb(34, 26, 12)),
note: (bright_green, Color::Rgb(16, 34, 16)),
interval: (Color::Rgb(100, 180, 100), Color::Rgb(18, 34, 18)),
variable: (purple, Color::Rgb(26, 22, 28)),
vary: (yellow, Color::Rgb(30, 30, 12)),
generator: (cyan, Color::Rgb(16, 30, 26)),
default: (fg_dim, bg),
},
table: TableColors {
row_even: bg,
row_odd: surface,
},
values: ValuesColors {
tempo: green,
value: fg_dim,
},
hint: HintColors {
key: green,
text: fg_muted,
},
view_badge: ViewBadgeColors { bg: fg, fg: bg },
nav: NavColors {
selected_bg: Color::Rgb(18, 38, 18),
selected_fg: fg,
unselected_bg: surface,
unselected_fg: fg_muted,
},
editor_widget: EditorWidgetColors {
cursor_bg: fg,
cursor_fg: bg,
selection_bg: Color::Rgb(24, 48, 24),
completion_bg: surface,
completion_fg: fg,
completion_selected: green,
completion_example: cyan,
},
browser: BrowserColors {
directory: blue,
project_file: green,
selected: bright_green,
file: fg,
focused_border: green,
unfocused_border: fg_muted,
root: fg,
file_icon: fg_muted,
folder_icon: blue,
empty_text: fg_muted,
},
input: InputColors {
text: green,
cursor: fg,
hint: fg_muted,
},
search: SearchColors {
active: green,
inactive: fg_muted,
match_bg: yellow,
match_fg: bg,
},
markdown: MarkdownColors {
h1: green,
h2: cyan,
h3: purple,
code: bright_green,
code_border: Color::Rgb(28, 42, 28),
link: cyan,
link_url: Color::Rgb(56, 72, 52),
quote: fg_muted,
text: fg,
list: fg,
},
engine: EngineColors {
header: green,
header_focused: bright_green,
divider: Color::Rgb(24, 36, 24),
scroll_indicator: Color::Rgb(36, 52, 36),
label: Color::Rgb(100, 120, 92),
label_focused: Color::Rgb(140, 160, 130),
label_dim: Color::Rgb(68, 84, 60),
value: Color::Rgb(180, 196, 172),
focused: bright_green,
normal: fg,
dim: Color::Rgb(36, 52, 36),
path: Color::Rgb(100, 120, 92),
border_magenta: purple,
border_green: green,
border_cyan: cyan,
separator: Color::Rgb(24, 36, 24),
hint_active: green,
hint_inactive: Color::Rgb(24, 36, 24),
},
dict: DictColors {
word_name: bright_green,
word_bg: Color::Rgb(14, 24, 14),
alias: fg_muted,
stack_sig: purple,
description: fg,
example: Color::Rgb(100, 120, 92),
category_focused: bright_green,
category_selected: green,
category_normal: fg,
category_dimmed: Color::Rgb(36, 52, 36),
border_focused: bright_green,
border_normal: Color::Rgb(24, 36, 24),
header_desc: Color::Rgb(120, 140, 112),
},
title: TitleColors {
big_title: green,
author: cyan,
link: bright_green,
license: yellow,
prompt: Color::Rgb(100, 120, 92),
subtitle: fg,
},
meter: MeterColors {
low: green,
mid: yellow,
high: red,
low_rgb: (64, 192, 64),
mid_rgb: (160, 160, 64),
high_rgb: (192, 80, 64),
},
sparkle: SparkleColors {
colors: [
(64, 192, 64),
(96, 224, 96),
(80, 168, 144),
(160, 160, 64),
(48, 128, 48),
],
},
confirm: ConfirmColors {
border: red,
button_selected_bg: green,
button_selected_fg: bg,
},
}
}