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,279 @@
use super::*;
use ratatui::style::Color;
pub fn theme() -> ThemeColors {
let background = Color::Rgb(40, 42, 54);
let current_line = Color::Rgb(68, 71, 90);
let foreground = Color::Rgb(248, 248, 242);
let comment = Color::Rgb(98, 114, 164);
let cyan = Color::Rgb(139, 233, 253);
let green = Color::Rgb(80, 250, 123);
let orange = Color::Rgb(255, 184, 108);
let pink = Color::Rgb(255, 121, 198);
let purple = Color::Rgb(189, 147, 249);
let red = Color::Rgb(255, 85, 85);
let yellow = Color::Rgb(241, 250, 140);
let darker_bg = Color::Rgb(33, 34, 44);
let lighter_bg = Color::Rgb(55, 57, 70);
ThemeColors {
ui: UiColors {
bg: background,
bg_rgb: (40, 42, 54),
text_primary: foreground,
text_muted: comment,
text_dim: Color::Rgb(80, 85, 110),
border: current_line,
header: purple,
unfocused: comment,
accent: purple,
surface: current_line,
},
status: StatusColors {
playing_bg: Color::Rgb(40, 60, 50),
playing_fg: green,
stopped_bg: Color::Rgb(65, 45, 50),
stopped_fg: red,
fill_on: green,
fill_off: comment,
fill_bg: current_line,
},
selection: SelectionColors {
cursor_bg: purple,
cursor_fg: background,
selected_bg: Color::Rgb(80, 75, 110),
selected_fg: purple,
in_range_bg: Color::Rgb(65, 65, 90),
in_range_fg: foreground,
cursor: purple,
selected: Color::Rgb(80, 75, 110),
in_range: Color::Rgb(65, 65, 90),
},
tile: TileColors {
playing_active_bg: Color::Rgb(85, 60, 65),
playing_active_fg: orange,
playing_inactive_bg: Color::Rgb(80, 75, 55),
playing_inactive_fg: yellow,
active_bg: Color::Rgb(50, 70, 70),
active_fg: cyan,
inactive_bg: current_line,
inactive_fg: comment,
active_selected_bg: Color::Rgb(80, 70, 95),
active_in_range_bg: Color::Rgb(65, 65, 85),
link_bright: [
(189, 147, 249),
(255, 121, 198),
(255, 184, 108),
(139, 233, 253),
(80, 250, 123),
],
link_dim: [
(75, 60, 95),
(95, 55, 80),
(95, 70, 50),
(55, 90, 95),
(40, 95, 55),
],
},
header: HeaderColors {
tempo_bg: Color::Rgb(65, 50, 75),
tempo_fg: purple,
bank_bg: Color::Rgb(45, 65, 70),
bank_fg: cyan,
pattern_bg: Color::Rgb(40, 70, 60),
pattern_fg: green,
stats_bg: current_line,
stats_fg: comment,
},
modal: ModalColors {
border: purple,
border_accent: pink,
border_warn: orange,
border_dim: comment,
confirm: orange,
rename: purple,
input: cyan,
editor: purple,
preview: comment,
},
flash: FlashColors {
error_bg: Color::Rgb(70, 45, 50),
error_fg: red,
success_bg: Color::Rgb(40, 65, 50),
success_fg: green,
info_bg: current_line,
info_fg: foreground,
event_rgb: (70, 55, 85),
},
list: ListColors {
playing_bg: Color::Rgb(40, 65, 50),
playing_fg: green,
staged_play_bg: Color::Rgb(70, 55, 85),
staged_play_fg: purple,
staged_stop_bg: Color::Rgb(80, 50, 60),
staged_stop_fg: red,
edit_bg: Color::Rgb(45, 70, 70),
edit_fg: cyan,
hover_bg: lighter_bg,
hover_fg: foreground,
},
link_status: LinkStatusColors {
disabled: red,
connected: green,
listening: yellow,
},
syntax: SyntaxColors {
gap_bg: darker_bg,
executed_bg: Color::Rgb(55, 50, 70),
selected_bg: Color::Rgb(85, 70, 50),
emit: (foreground, Color::Rgb(85, 55, 65)),
number: (orange, Color::Rgb(75, 55, 45)),
string: (yellow, Color::Rgb(70, 70, 45)),
comment: (comment, darker_bg),
keyword: (pink, Color::Rgb(80, 50, 70)),
stack_op: (cyan, Color::Rgb(45, 65, 75)),
operator: (green, Color::Rgb(40, 70, 50)),
sound: (cyan, Color::Rgb(45, 70, 70)),
param: (purple, Color::Rgb(60, 50, 75)),
context: (orange, Color::Rgb(75, 55, 45)),
note: (green, Color::Rgb(40, 70, 50)),
interval: (Color::Rgb(120, 255, 150), Color::Rgb(40, 75, 50)),
variable: (pink, Color::Rgb(80, 50, 65)),
vary: (yellow, Color::Rgb(70, 70, 45)),
generator: (cyan, Color::Rgb(45, 70, 65)),
default: (comment, darker_bg),
},
table: TableColors {
row_even: darker_bg,
row_odd: background,
},
values: ValuesColors {
tempo: orange,
value: comment,
},
hint: HintColors {
key: orange,
text: comment,
},
view_badge: ViewBadgeColors {
bg: foreground,
fg: background,
},
nav: NavColors {
selected_bg: Color::Rgb(75, 65, 100),
selected_fg: foreground,
unselected_bg: current_line,
unselected_fg: comment,
},
editor_widget: EditorWidgetColors {
cursor_bg: foreground,
cursor_fg: background,
selection_bg: Color::Rgb(70, 75, 105),
completion_bg: current_line,
completion_fg: foreground,
completion_selected: orange,
completion_example: cyan,
},
browser: BrowserColors {
directory: cyan,
project_file: purple,
selected: orange,
file: foreground,
focused_border: orange,
unfocused_border: comment,
root: foreground,
file_icon: comment,
folder_icon: cyan,
empty_text: comment,
},
input: InputColors {
text: cyan,
cursor: foreground,
hint: comment,
},
search: SearchColors {
active: orange,
inactive: comment,
match_bg: yellow,
match_fg: background,
},
markdown: MarkdownColors {
h1: cyan,
h2: orange,
h3: purple,
code: green,
code_border: Color::Rgb(85, 90, 110),
link: pink,
link_url: Color::Rgb(120, 130, 150),
quote: comment,
text: foreground,
list: foreground,
},
engine: EngineColors {
header: cyan,
header_focused: yellow,
divider: Color::Rgb(80, 85, 105),
scroll_indicator: Color::Rgb(95, 100, 120),
label: Color::Rgb(140, 145, 165),
label_focused: Color::Rgb(170, 175, 195),
label_dim: Color::Rgb(110, 115, 135),
value: Color::Rgb(200, 205, 220),
focused: yellow,
normal: foreground,
dim: Color::Rgb(95, 100, 120),
path: Color::Rgb(140, 145, 165),
border_magenta: pink,
border_green: green,
border_cyan: cyan,
separator: Color::Rgb(80, 85, 105),
hint_active: Color::Rgb(220, 200, 100),
hint_inactive: Color::Rgb(80, 85, 105),
},
dict: DictColors {
word_name: green,
word_bg: Color::Rgb(55, 65, 80),
alias: comment,
stack_sig: purple,
description: foreground,
example: Color::Rgb(140, 145, 165),
category_focused: yellow,
category_selected: cyan,
category_normal: foreground,
category_dimmed: Color::Rgb(95, 100, 120),
border_focused: yellow,
border_normal: Color::Rgb(80, 85, 105),
header_desc: Color::Rgb(160, 165, 185),
},
title: TitleColors {
big_title: purple,
author: pink,
link: cyan,
license: orange,
prompt: Color::Rgb(160, 165, 185),
subtitle: foreground,
},
meter: MeterColors {
low: green,
mid: yellow,
high: red,
low_rgb: (70, 230, 110),
mid_rgb: (230, 240, 130),
high_rgb: (240, 80, 80),
},
sparkle: SparkleColors {
colors: [
(189, 147, 249),
(255, 184, 108),
(80, 250, 123),
(255, 121, 198),
(139, 233, 253),
],
},
confirm: ConfirmColors {
border: orange,
button_selected_bg: orange,
button_selected_fg: background,
},
}
}