New themes

This commit is contained in:
2026-02-06 00:19:16 +01:00
parent 51f52be4ce
commit 6ec3a86568
11 changed files with 1178 additions and 46 deletions

View File

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