Feat: begin slight refactoring

This commit is contained in:
2026-02-01 12:38:48 +01:00
parent 5b4a6ddd14
commit c356aebfde
39 changed files with 4699 additions and 3168 deletions

View File

@@ -0,0 +1,282 @@
use super::*;
use ratatui::style::Color;
pub fn theme() -> ThemeColors {
let crust = Color::Rgb(220, 224, 232);
let mantle = Color::Rgb(230, 233, 239);
let base = Color::Rgb(239, 241, 245);
let surface0 = Color::Rgb(204, 208, 218);
let surface1 = Color::Rgb(188, 192, 204);
let overlay0 = Color::Rgb(156, 160, 176);
let overlay1 = Color::Rgb(140, 143, 161);
let subtext0 = Color::Rgb(108, 111, 133);
let subtext1 = Color::Rgb(92, 95, 119);
let text = Color::Rgb(76, 79, 105);
let pink = Color::Rgb(234, 118, 203);
let mauve = Color::Rgb(136, 57, 239);
let red = Color::Rgb(210, 15, 57);
let maroon = Color::Rgb(230, 69, 83);
let peach = Color::Rgb(254, 100, 11);
let yellow = Color::Rgb(223, 142, 29);
let green = Color::Rgb(64, 160, 43);
let teal = Color::Rgb(23, 146, 153);
let sapphire = Color::Rgb(32, 159, 181);
let lavender = Color::Rgb(114, 135, 253);
ThemeColors {
ui: UiColors {
bg: base,
bg_rgb: (239, 241, 245),
text_primary: text,
text_muted: subtext0,
text_dim: overlay1,
border: surface1,
header: lavender,
unfocused: overlay0,
accent: mauve,
surface: surface0,
},
status: StatusColors {
playing_bg: Color::Rgb(220, 240, 225),
playing_fg: green,
stopped_bg: Color::Rgb(245, 220, 225),
stopped_fg: red,
fill_on: green,
fill_off: overlay0,
fill_bg: surface0,
},
selection: SelectionColors {
cursor_bg: mauve,
cursor_fg: base,
selected_bg: Color::Rgb(200, 200, 230),
selected_fg: lavender,
in_range_bg: Color::Rgb(210, 210, 235),
in_range_fg: subtext1,
cursor: mauve,
selected: Color::Rgb(200, 200, 230),
in_range: Color::Rgb(210, 210, 235),
},
tile: TileColors {
playing_active_bg: Color::Rgb(250, 220, 210),
playing_active_fg: peach,
playing_inactive_bg: Color::Rgb(250, 235, 200),
playing_inactive_fg: yellow,
active_bg: Color::Rgb(200, 235, 235),
active_fg: teal,
inactive_bg: surface0,
inactive_fg: subtext0,
active_selected_bg: Color::Rgb(215, 210, 240),
active_in_range_bg: Color::Rgb(210, 215, 230),
link_bright: [
(136, 57, 239),
(234, 118, 203),
(254, 100, 11),
(4, 165, 229),
(64, 160, 43),
],
link_dim: [
(210, 200, 240),
(240, 210, 230),
(250, 220, 200),
(200, 230, 240),
(210, 235, 210),
],
},
header: HeaderColors {
tempo_bg: Color::Rgb(220, 210, 240),
tempo_fg: mauve,
bank_bg: Color::Rgb(200, 230, 235),
bank_fg: sapphire,
pattern_bg: Color::Rgb(200, 230, 225),
pattern_fg: teal,
stats_bg: surface0,
stats_fg: subtext0,
},
modal: ModalColors {
border: lavender,
border_accent: mauve,
border_warn: peach,
border_dim: overlay1,
confirm: peach,
rename: mauve,
input: sapphire,
editor: lavender,
preview: overlay1,
},
flash: FlashColors {
error_bg: Color::Rgb(250, 215, 220),
error_fg: red,
success_bg: Color::Rgb(210, 240, 215),
success_fg: green,
info_bg: surface0,
info_fg: text,
event_rgb: (225, 215, 240),
},
list: ListColors {
playing_bg: Color::Rgb(210, 235, 220),
playing_fg: green,
staged_play_bg: Color::Rgb(225, 215, 245),
staged_play_fg: mauve,
staged_stop_bg: Color::Rgb(245, 215, 225),
staged_stop_fg: maroon,
edit_bg: Color::Rgb(210, 235, 235),
edit_fg: teal,
hover_bg: surface1,
hover_fg: text,
},
link_status: LinkStatusColors {
disabled: red,
connected: green,
listening: yellow,
},
syntax: SyntaxColors {
gap_bg: mantle,
executed_bg: Color::Rgb(225, 220, 240),
selected_bg: Color::Rgb(250, 235, 210),
emit: (text, Color::Rgb(250, 220, 215)),
number: (peach, Color::Rgb(252, 235, 220)),
string: (green, Color::Rgb(215, 240, 215)),
comment: (overlay1, crust),
keyword: (mauve, Color::Rgb(230, 220, 245)),
stack_op: (sapphire, Color::Rgb(215, 230, 240)),
operator: (yellow, Color::Rgb(245, 235, 210)),
sound: (teal, Color::Rgb(210, 240, 240)),
param: (lavender, Color::Rgb(220, 225, 245)),
context: (peach, Color::Rgb(252, 235, 220)),
note: (green, Color::Rgb(215, 240, 215)),
interval: (Color::Rgb(50, 140, 30), Color::Rgb(215, 240, 210)),
variable: (pink, Color::Rgb(245, 220, 240)),
vary: (yellow, Color::Rgb(245, 235, 210)),
generator: (teal, Color::Rgb(210, 240, 235)),
default: (subtext0, mantle),
},
table: TableColors {
row_even: mantle,
row_odd: base,
},
values: ValuesColors {
tempo: peach,
value: subtext0,
},
hint: HintColors {
key: peach,
text: overlay1,
},
view_badge: ViewBadgeColors { bg: text, fg: base },
nav: NavColors {
selected_bg: Color::Rgb(215, 205, 245),
selected_fg: text,
unselected_bg: surface0,
unselected_fg: overlay1,
},
editor_widget: EditorWidgetColors {
cursor_bg: text,
cursor_fg: base,
selection_bg: Color::Rgb(200, 210, 240),
completion_bg: surface0,
completion_fg: text,
completion_selected: peach,
completion_example: teal,
},
browser: BrowserColors {
directory: sapphire,
project_file: mauve,
selected: peach,
file: text,
focused_border: peach,
unfocused_border: overlay0,
root: text,
file_icon: overlay1,
folder_icon: sapphire,
empty_text: overlay1,
},
input: InputColors {
text: sapphire,
cursor: text,
hint: overlay1,
},
search: SearchColors {
active: peach,
inactive: overlay0,
match_bg: yellow,
match_fg: base,
},
markdown: MarkdownColors {
h1: sapphire,
h2: peach,
h3: mauve,
code: green,
code_border: Color::Rgb(190, 195, 205),
link: teal,
link_url: Color::Rgb(150, 150, 150),
quote: overlay1,
text,
list: text,
},
engine: EngineColors {
header: Color::Rgb(30, 120, 150),
header_focused: yellow,
divider: Color::Rgb(180, 185, 195),
scroll_indicator: Color::Rgb(160, 165, 175),
label: Color::Rgb(100, 105, 120),
label_focused: Color::Rgb(70, 75, 90),
label_dim: Color::Rgb(120, 125, 140),
value: Color::Rgb(60, 65, 80),
focused: yellow,
normal: text,
dim: Color::Rgb(160, 165, 175),
path: Color::Rgb(100, 105, 120),
border_magenta: mauve,
border_green: green,
border_cyan: sapphire,
separator: Color::Rgb(180, 185, 200),
hint_active: Color::Rgb(180, 140, 40),
hint_inactive: Color::Rgb(190, 195, 205),
},
dict: DictColors {
word_name: green,
word_bg: Color::Rgb(210, 225, 235),
alias: overlay1,
stack_sig: mauve,
description: text,
example: Color::Rgb(100, 105, 115),
category_focused: yellow,
category_selected: sapphire,
category_normal: text,
category_dimmed: Color::Rgb(160, 165, 175),
border_focused: yellow,
border_normal: Color::Rgb(180, 185, 195),
header_desc: Color::Rgb(90, 95, 110),
},
title: TitleColors {
big_title: mauve,
author: lavender,
link: teal,
license: peach,
prompt: Color::Rgb(90, 100, 115),
subtitle: text,
},
meter: MeterColors {
low: green,
mid: yellow,
high: red,
low_rgb: (50, 150, 40),
mid_rgb: (200, 140, 30),
high_rgb: (200, 40, 50),
},
sparkle: SparkleColors {
colors: [
(114, 135, 253),
(254, 100, 11),
(64, 160, 43),
(234, 118, 203),
(136, 57, 239),
],
},
confirm: ConfirmColors {
border: peach,
button_selected_bg: peach,
button_selected_fg: base,
},
}
}