Feat: refactoring codebase
This commit is contained in:
274
crates/ratatui/src/theme/build.rs
Normal file
274
crates/ratatui/src/theme/build.rs
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
use super::*;
|
||||||
|
use super::palette::{Palette, Rgb, darken, mid, rgb, tint};
|
||||||
|
|
||||||
|
pub fn build(p: &Palette) -> ThemeColors {
|
||||||
|
let darker_bg = darken(p.bg, 0.15);
|
||||||
|
|
||||||
|
ThemeColors {
|
||||||
|
ui: UiColors {
|
||||||
|
bg: rgb(p.bg),
|
||||||
|
bg_rgb: p.bg,
|
||||||
|
text_primary: rgb(p.fg),
|
||||||
|
text_muted: rgb(p.fg_dim),
|
||||||
|
text_dim: rgb(p.fg_muted),
|
||||||
|
border: rgb(p.surface2),
|
||||||
|
header: rgb(p.cyan),
|
||||||
|
unfocused: rgb(p.fg_muted),
|
||||||
|
accent: rgb(p.accent),
|
||||||
|
surface: rgb(p.surface),
|
||||||
|
},
|
||||||
|
status: StatusColors {
|
||||||
|
playing_bg: rgb(tint(p.bg, p.green, 0.25)),
|
||||||
|
playing_fg: rgb(p.green),
|
||||||
|
stopped_bg: rgb(tint(p.bg, p.red, 0.25)),
|
||||||
|
stopped_fg: rgb(p.red),
|
||||||
|
fill_on: rgb(p.green),
|
||||||
|
fill_off: rgb(p.fg_muted),
|
||||||
|
fill_bg: rgb(p.surface),
|
||||||
|
},
|
||||||
|
selection: SelectionColors {
|
||||||
|
cursor_bg: rgb(p.accent),
|
||||||
|
cursor_fg: rgb(p.bg),
|
||||||
|
selected_bg: rgb(tint(p.bg, p.accent, 0.30)),
|
||||||
|
selected_fg: rgb(p.accent),
|
||||||
|
in_range_bg: rgb(tint(p.bg, p.accent, 0.20)),
|
||||||
|
in_range_fg: rgb(p.fg),
|
||||||
|
cursor: rgb(p.accent),
|
||||||
|
selected: rgb(tint(p.bg, p.accent, 0.30)),
|
||||||
|
in_range: rgb(tint(p.bg, p.accent, 0.20)),
|
||||||
|
},
|
||||||
|
tile: TileColors {
|
||||||
|
playing_active_bg: rgb(tint(p.bg, p.orange, 0.35)),
|
||||||
|
playing_active_fg: rgb(p.orange),
|
||||||
|
playing_inactive_bg: rgb(tint(p.bg, p.yellow, 0.30)),
|
||||||
|
playing_inactive_fg: rgb(p.yellow),
|
||||||
|
active_bg: rgb(tint(p.bg, p.cyan, 0.25)),
|
||||||
|
active_fg: rgb(p.cyan),
|
||||||
|
content_bg: rgb(tint(p.bg, p.cyan, 0.30)),
|
||||||
|
inactive_bg: rgb(p.surface),
|
||||||
|
inactive_fg: rgb(p.fg_dim),
|
||||||
|
active_selected_bg: rgb(tint(p.bg, p.accent, 0.35)),
|
||||||
|
active_in_range_bg: rgb(tint(p.bg, p.accent, 0.22)),
|
||||||
|
link_bright: p.link_bright,
|
||||||
|
link_dim: p.link_dim,
|
||||||
|
},
|
||||||
|
header: HeaderColors {
|
||||||
|
tempo_bg: rgb(tint(p.bg, p.tempo_color, 0.30)),
|
||||||
|
tempo_fg: rgb(p.tempo_color),
|
||||||
|
bank_bg: rgb(tint(p.bg, p.bank_color, 0.25)),
|
||||||
|
bank_fg: rgb(p.bank_color),
|
||||||
|
pattern_bg: rgb(tint(p.bg, p.pattern_color, 0.25)),
|
||||||
|
pattern_fg: rgb(p.pattern_color),
|
||||||
|
stats_bg: rgb(p.surface),
|
||||||
|
stats_fg: rgb(p.fg_dim),
|
||||||
|
},
|
||||||
|
modal: ModalColors {
|
||||||
|
border: rgb(p.cyan),
|
||||||
|
border_accent: rgb(p.accent),
|
||||||
|
border_warn: rgb(p.orange),
|
||||||
|
border_dim: rgb(p.fg_muted),
|
||||||
|
confirm: rgb(p.orange),
|
||||||
|
rename: rgb(p.purple),
|
||||||
|
input: rgb(p.cyan),
|
||||||
|
editor: rgb(p.cyan),
|
||||||
|
preview: rgb(p.fg_muted),
|
||||||
|
},
|
||||||
|
flash: FlashColors {
|
||||||
|
error_bg: rgb(tint(p.bg, p.red, 0.30)),
|
||||||
|
error_fg: rgb(p.red),
|
||||||
|
success_bg: rgb(tint(p.bg, p.green, 0.25)),
|
||||||
|
success_fg: rgb(p.green),
|
||||||
|
info_bg: rgb(p.surface),
|
||||||
|
info_fg: rgb(p.fg),
|
||||||
|
},
|
||||||
|
list: ListColors {
|
||||||
|
playing_bg: rgb(tint(p.bg, p.green, 0.25)),
|
||||||
|
playing_fg: rgb(p.green),
|
||||||
|
staged_play_bg: rgb(tint(p.bg, p.purple, 0.30)),
|
||||||
|
staged_play_fg: rgb(p.purple),
|
||||||
|
staged_stop_bg: rgb(tint(p.bg, p.red, 0.30)),
|
||||||
|
staged_stop_fg: rgb(p.red),
|
||||||
|
edit_bg: rgb(tint(p.bg, p.cyan, 0.25)),
|
||||||
|
edit_fg: rgb(p.cyan),
|
||||||
|
hover_bg: rgb(p.surface2),
|
||||||
|
hover_fg: rgb(p.fg),
|
||||||
|
muted_bg: rgb(tint(p.bg, p.surface, 0.30)),
|
||||||
|
muted_fg: rgb(p.fg_muted),
|
||||||
|
soloed_bg: rgb(tint(p.bg, p.yellow, 0.30)),
|
||||||
|
soloed_fg: rgb(p.yellow),
|
||||||
|
},
|
||||||
|
link_status: LinkStatusColors {
|
||||||
|
disabled: rgb(p.red),
|
||||||
|
connected: rgb(p.green),
|
||||||
|
listening: rgb(p.yellow),
|
||||||
|
},
|
||||||
|
syntax: syntax_colors(p, darker_bg),
|
||||||
|
table: TableColors {
|
||||||
|
row_even: rgb(darker_bg),
|
||||||
|
row_odd: rgb(p.bg),
|
||||||
|
},
|
||||||
|
values: ValuesColors {
|
||||||
|
tempo: rgb(p.orange),
|
||||||
|
value: rgb(p.fg_dim),
|
||||||
|
},
|
||||||
|
hint: HintColors {
|
||||||
|
key: rgb(p.orange),
|
||||||
|
text: rgb(p.fg_muted),
|
||||||
|
},
|
||||||
|
view_badge: ViewBadgeColors {
|
||||||
|
bg: rgb(p.fg),
|
||||||
|
fg: rgb(p.bg),
|
||||||
|
},
|
||||||
|
nav: NavColors {
|
||||||
|
selected_bg: rgb(tint(p.bg, p.accent, 0.35)),
|
||||||
|
selected_fg: rgb(p.fg),
|
||||||
|
unselected_bg: rgb(p.surface),
|
||||||
|
unselected_fg: rgb(p.fg_muted),
|
||||||
|
},
|
||||||
|
editor_widget: EditorWidgetColors {
|
||||||
|
cursor_bg: rgb(p.fg),
|
||||||
|
cursor_fg: rgb(p.bg),
|
||||||
|
selection_bg: rgb(tint(p.bg, p.accent, 0.30)),
|
||||||
|
completion_bg: rgb(p.surface),
|
||||||
|
completion_fg: rgb(p.fg),
|
||||||
|
completion_selected: rgb(p.orange),
|
||||||
|
completion_example: rgb(p.cyan),
|
||||||
|
},
|
||||||
|
browser: BrowserColors {
|
||||||
|
directory: rgb(p.blue),
|
||||||
|
project_file: rgb(p.purple),
|
||||||
|
selected: rgb(p.orange),
|
||||||
|
file: rgb(p.fg),
|
||||||
|
focused_border: rgb(p.orange),
|
||||||
|
unfocused_border: rgb(p.fg_muted),
|
||||||
|
root: rgb(p.fg),
|
||||||
|
file_icon: rgb(p.fg_muted),
|
||||||
|
folder_icon: rgb(p.blue),
|
||||||
|
empty_text: rgb(p.fg_muted),
|
||||||
|
},
|
||||||
|
input: InputColors {
|
||||||
|
text: rgb(p.cyan),
|
||||||
|
cursor: rgb(p.fg),
|
||||||
|
hint: rgb(p.fg_muted),
|
||||||
|
},
|
||||||
|
search: SearchColors {
|
||||||
|
active: rgb(p.orange),
|
||||||
|
inactive: rgb(p.fg_muted),
|
||||||
|
match_bg: rgb(p.yellow),
|
||||||
|
match_fg: rgb(p.bg),
|
||||||
|
},
|
||||||
|
markdown: MarkdownColors {
|
||||||
|
h1: rgb(p.cyan),
|
||||||
|
h2: rgb(p.orange),
|
||||||
|
h3: rgb(p.purple),
|
||||||
|
code: rgb(p.green),
|
||||||
|
code_border: rgb(mid(p.surface2, p.fg_muted, 0.3)),
|
||||||
|
link: rgb(p.accent),
|
||||||
|
link_url: rgb(mid(p.fg_muted, p.fg_dim, 0.3)),
|
||||||
|
quote: rgb(p.fg_muted),
|
||||||
|
text: rgb(p.fg),
|
||||||
|
list: rgb(p.fg),
|
||||||
|
},
|
||||||
|
engine: engine_colors(p),
|
||||||
|
dict: dict_colors(p),
|
||||||
|
title: TitleColors {
|
||||||
|
big_title: rgb(p.title_accent),
|
||||||
|
author: rgb(p.title_author),
|
||||||
|
link: rgb(p.green),
|
||||||
|
license: rgb(p.orange),
|
||||||
|
prompt: rgb(mid(p.fg_dim, p.fg, 0.3)),
|
||||||
|
subtitle: rgb(p.fg),
|
||||||
|
},
|
||||||
|
meter: MeterColors {
|
||||||
|
low: rgb(p.green),
|
||||||
|
mid: rgb(p.yellow),
|
||||||
|
high: rgb(p.red),
|
||||||
|
low_rgb: p.meter[0],
|
||||||
|
mid_rgb: p.meter[1],
|
||||||
|
high_rgb: p.meter[2],
|
||||||
|
},
|
||||||
|
sparkle: SparkleColors {
|
||||||
|
colors: p.sparkle,
|
||||||
|
},
|
||||||
|
confirm: ConfirmColors {
|
||||||
|
border: rgb(p.orange),
|
||||||
|
button_selected_bg: rgb(p.orange),
|
||||||
|
button_selected_fg: rgb(p.bg),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn syntax_colors(p: &Palette, darker_bg: Rgb) -> SyntaxColors {
|
||||||
|
let syn_bg = |accent: Rgb| -> Color { rgb(tint(p.bg, accent, 0.20)) };
|
||||||
|
let interval_fg = mid(p.green, p.fg, 0.3);
|
||||||
|
|
||||||
|
SyntaxColors {
|
||||||
|
gap_bg: rgb(darker_bg),
|
||||||
|
executed_bg: rgb(tint(p.bg, p.purple, 0.15)),
|
||||||
|
selected_bg: rgb(tint(p.bg, p.orange, 0.30)),
|
||||||
|
emit: (rgb(p.fg), syn_bg(p.accent)),
|
||||||
|
number: (rgb(p.purple), syn_bg(p.purple)),
|
||||||
|
string: (rgb(p.green), syn_bg(p.green)),
|
||||||
|
comment: (rgb(p.fg_muted), rgb(darker_bg)),
|
||||||
|
keyword: (rgb(p.accent), syn_bg(p.accent)),
|
||||||
|
stack_op: (rgb(p.blue), syn_bg(p.blue)),
|
||||||
|
operator: (rgb(p.red), syn_bg(p.red)),
|
||||||
|
sound: (rgb(p.cyan), syn_bg(p.cyan)),
|
||||||
|
param: (rgb(p.orange), syn_bg(p.orange)),
|
||||||
|
context: (rgb(p.orange), syn_bg(p.orange)),
|
||||||
|
note: (rgb(p.green), syn_bg(p.green)),
|
||||||
|
interval: (rgb(interval_fg), syn_bg(p.green)),
|
||||||
|
variable: (rgb(p.purple), syn_bg(p.purple)),
|
||||||
|
vary: (rgb(p.yellow), syn_bg(p.yellow)),
|
||||||
|
generator: (rgb(p.cyan), syn_bg(p.cyan)),
|
||||||
|
user_defined: (rgb(p.secondary), syn_bg(p.secondary)),
|
||||||
|
default: (rgb(p.fg_dim), rgb(darker_bg)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn engine_colors(p: &Palette) -> EngineColors {
|
||||||
|
let divider = mid(p.surface2, p.fg_muted, 0.2);
|
||||||
|
let label = mid(p.fg_muted, p.fg, 0.4);
|
||||||
|
|
||||||
|
EngineColors {
|
||||||
|
header: rgb(p.cyan),
|
||||||
|
header_focused: rgb(p.yellow),
|
||||||
|
divider: rgb(divider),
|
||||||
|
scroll_indicator: rgb(mid(divider, p.fg_muted, 0.3)),
|
||||||
|
label: rgb(label),
|
||||||
|
label_focused: rgb(mid(label, p.fg, 0.3)),
|
||||||
|
label_dim: rgb(mid(p.fg_muted, label, 0.3)),
|
||||||
|
value: rgb(mid(p.fg_dim, p.fg, 0.5)),
|
||||||
|
focused: rgb(p.yellow),
|
||||||
|
normal: rgb(p.fg),
|
||||||
|
dim: rgb(mid(divider, p.fg_muted, 0.3)),
|
||||||
|
path: rgb(label),
|
||||||
|
border_magenta: rgb(p.purple),
|
||||||
|
border_green: rgb(p.green),
|
||||||
|
border_cyan: rgb(p.cyan),
|
||||||
|
separator: rgb(divider),
|
||||||
|
hint_active: rgb(mid(p.orange, p.yellow, 0.5)),
|
||||||
|
hint_inactive: rgb(divider),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn dict_colors(p: &Palette) -> DictColors {
|
||||||
|
let divider = mid(p.surface2, p.fg_muted, 0.2);
|
||||||
|
let label = mid(p.fg_muted, p.fg, 0.4);
|
||||||
|
|
||||||
|
DictColors {
|
||||||
|
word_name: rgb(p.green),
|
||||||
|
word_bg: rgb(tint(p.bg, p.cyan, 0.20)),
|
||||||
|
alias: rgb(p.fg_muted),
|
||||||
|
stack_sig: rgb(p.purple),
|
||||||
|
description: rgb(p.fg),
|
||||||
|
example: rgb(label),
|
||||||
|
category_focused: rgb(p.yellow),
|
||||||
|
category_selected: rgb(p.cyan),
|
||||||
|
category_normal: rgb(p.fg),
|
||||||
|
category_dimmed: rgb(mid(divider, p.fg_muted, 0.3)),
|
||||||
|
border_focused: rgb(p.yellow),
|
||||||
|
border_normal: rgb(divider),
|
||||||
|
header_desc: rgb(mid(label, p.fg, 0.3)),
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,287 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let crust = Color::Rgb(220, 224, 232);
|
Palette {
|
||||||
let mantle = Color::Rgb(230, 233, 239);
|
bg: (239, 241, 245),
|
||||||
let base = Color::Rgb(239, 241, 245);
|
surface: (204, 208, 218),
|
||||||
let surface0 = Color::Rgb(204, 208, 218);
|
surface2: (188, 192, 204),
|
||||||
let surface1 = Color::Rgb(188, 192, 204);
|
fg: (76, 79, 105),
|
||||||
let overlay0 = Color::Rgb(156, 160, 176);
|
fg_dim: (108, 111, 133),
|
||||||
let overlay1 = Color::Rgb(140, 143, 161);
|
fg_muted: (140, 143, 161),
|
||||||
let subtext0 = Color::Rgb(108, 111, 133);
|
accent: (136, 57, 239), // mauve
|
||||||
let subtext1 = Color::Rgb(92, 95, 119);
|
red: (210, 15, 57),
|
||||||
let text = Color::Rgb(76, 79, 105);
|
green: (64, 160, 43),
|
||||||
let pink = Color::Rgb(234, 118, 203);
|
yellow: (223, 142, 29),
|
||||||
let mauve = Color::Rgb(136, 57, 239);
|
blue: (32, 159, 181), // sapphire
|
||||||
let red = Color::Rgb(210, 15, 57);
|
purple: (136, 57, 239),
|
||||||
let maroon = Color::Rgb(230, 69, 83);
|
cyan: (23, 146, 153), // teal
|
||||||
let peach = Color::Rgb(254, 100, 11);
|
orange: (254, 100, 11), // peach
|
||||||
let yellow = Color::Rgb(223, 142, 29);
|
tempo_color: (136, 57, 239),
|
||||||
let green = Color::Rgb(64, 160, 43);
|
bank_color: (32, 159, 181),
|
||||||
let teal = Color::Rgb(23, 146, 153);
|
pattern_color: (23, 146, 153),
|
||||||
let sapphire = Color::Rgb(32, 159, 181);
|
title_accent: (136, 57, 239),
|
||||||
let lavender = Color::Rgb(114, 135, 253);
|
title_author: (114, 135, 253),
|
||||||
|
secondary: (230, 69, 83), // maroon
|
||||||
ThemeColors {
|
link_bright: [
|
||||||
ui: UiColors {
|
(136, 57, 239), (234, 118, 203), (254, 100, 11),
|
||||||
bg: base,
|
(4, 165, 229), (64, 160, 43),
|
||||||
bg_rgb: (239, 241, 245),
|
],
|
||||||
text_primary: text,
|
link_dim: [
|
||||||
text_muted: subtext0,
|
(210, 200, 240), (240, 210, 230), (250, 220, 200),
|
||||||
text_dim: overlay1,
|
(200, 230, 240), (210, 235, 210),
|
||||||
border: surface1,
|
],
|
||||||
header: lavender,
|
sparkle: [
|
||||||
unfocused: overlay0,
|
(114, 135, 253), (254, 100, 11), (64, 160, 43),
|
||||||
accent: mauve,
|
(234, 118, 203), (136, 57, 239),
|
||||||
surface: surface0,
|
],
|
||||||
},
|
meter: [(50, 150, 40), (200, 140, 30), (200, 40, 50)],
|
||||||
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,
|
|
||||||
content_bg: Color::Rgb(185, 225, 225),
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
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,
|
|
||||||
muted_bg: Color::Rgb(215, 215, 225),
|
|
||||||
muted_fg: overlay0,
|
|
||||||
soloed_bg: Color::Rgb(250, 235, 200),
|
|
||||||
soloed_fg: yellow,
|
|
||||||
},
|
|
||||||
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)),
|
|
||||||
user_defined: (maroon, Color::Rgb(245, 225, 230)),
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,290 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let crust = Color::Rgb(17, 17, 27);
|
Palette {
|
||||||
let mantle = Color::Rgb(24, 24, 37);
|
bg: (30, 30, 46),
|
||||||
let base = Color::Rgb(30, 30, 46);
|
surface: (49, 50, 68),
|
||||||
let surface0 = Color::Rgb(49, 50, 68);
|
surface2: (69, 71, 90),
|
||||||
let surface1 = Color::Rgb(69, 71, 90);
|
fg: (205, 214, 244),
|
||||||
let overlay0 = Color::Rgb(108, 112, 134);
|
fg_dim: (166, 173, 200),
|
||||||
let overlay1 = Color::Rgb(127, 132, 156);
|
fg_muted: (127, 132, 156),
|
||||||
let subtext0 = Color::Rgb(166, 173, 200);
|
accent: (203, 166, 247), // mauve
|
||||||
let subtext1 = Color::Rgb(186, 194, 222);
|
red: (243, 139, 168),
|
||||||
let text = Color::Rgb(205, 214, 244);
|
green: (166, 227, 161),
|
||||||
let pink = Color::Rgb(245, 194, 231);
|
yellow: (249, 226, 175),
|
||||||
let mauve = Color::Rgb(203, 166, 247);
|
blue: (116, 199, 236), // sapphire
|
||||||
let red = Color::Rgb(243, 139, 168);
|
purple: (203, 166, 247), // mauve
|
||||||
let maroon = Color::Rgb(235, 160, 172);
|
cyan: (148, 226, 213), // teal
|
||||||
let peach = Color::Rgb(250, 179, 135);
|
orange: (250, 179, 135), // peach
|
||||||
let yellow = Color::Rgb(249, 226, 175);
|
tempo_color: (203, 166, 247),
|
||||||
let green = Color::Rgb(166, 227, 161);
|
bank_color: (116, 199, 236),
|
||||||
let teal = Color::Rgb(148, 226, 213);
|
pattern_color: (148, 226, 213),
|
||||||
let sapphire = Color::Rgb(116, 199, 236);
|
title_accent: (203, 166, 247),
|
||||||
let lavender = Color::Rgb(180, 190, 254);
|
title_author: (180, 190, 254),
|
||||||
|
secondary: (235, 160, 172), // maroon
|
||||||
ThemeColors {
|
link_bright: [
|
||||||
ui: UiColors {
|
(203, 166, 247), (245, 194, 231), (250, 179, 135),
|
||||||
bg: base,
|
(137, 220, 235), (166, 227, 161),
|
||||||
bg_rgb: (30, 30, 46),
|
],
|
||||||
text_primary: text,
|
link_dim: [
|
||||||
text_muted: subtext0,
|
(70, 55, 85), (85, 65, 80), (85, 60, 45),
|
||||||
text_dim: overlay1,
|
(45, 75, 80), (55, 80, 55),
|
||||||
border: surface1,
|
],
|
||||||
header: lavender,
|
sparkle: [
|
||||||
unfocused: overlay0,
|
(200, 220, 255), (250, 179, 135), (166, 227, 161),
|
||||||
accent: mauve,
|
(245, 194, 231), (203, 166, 247),
|
||||||
surface: surface0,
|
],
|
||||||
},
|
meter: [(40, 180, 80), (220, 180, 40), (220, 60, 40)],
|
||||||
status: StatusColors {
|
|
||||||
playing_bg: Color::Rgb(30, 50, 40),
|
|
||||||
playing_fg: green,
|
|
||||||
stopped_bg: Color::Rgb(50, 30, 40),
|
|
||||||
stopped_fg: red,
|
|
||||||
fill_on: green,
|
|
||||||
fill_off: overlay0,
|
|
||||||
fill_bg: surface0,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: mauve,
|
|
||||||
cursor_fg: crust,
|
|
||||||
selected_bg: Color::Rgb(60, 60, 90),
|
|
||||||
selected_fg: lavender,
|
|
||||||
in_range_bg: Color::Rgb(50, 50, 75),
|
|
||||||
in_range_fg: subtext1,
|
|
||||||
cursor: mauve,
|
|
||||||
selected: Color::Rgb(60, 60, 90),
|
|
||||||
in_range: Color::Rgb(50, 50, 75),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(80, 50, 60),
|
|
||||||
playing_active_fg: peach,
|
|
||||||
playing_inactive_bg: Color::Rgb(70, 55, 45),
|
|
||||||
playing_inactive_fg: yellow,
|
|
||||||
active_bg: Color::Rgb(40, 55, 55),
|
|
||||||
active_fg: teal,
|
|
||||||
content_bg: Color::Rgb(47, 62, 62),
|
|
||||||
inactive_bg: surface0,
|
|
||||||
inactive_fg: subtext0,
|
|
||||||
active_selected_bg: Color::Rgb(70, 60, 80),
|
|
||||||
active_in_range_bg: Color::Rgb(55, 55, 70),
|
|
||||||
link_bright: [
|
|
||||||
(203, 166, 247),
|
|
||||||
(245, 194, 231),
|
|
||||||
(250, 179, 135),
|
|
||||||
(137, 220, 235),
|
|
||||||
(166, 227, 161),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(70, 55, 85),
|
|
||||||
(85, 65, 80),
|
|
||||||
(85, 60, 45),
|
|
||||||
(45, 75, 80),
|
|
||||||
(55, 80, 55),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(50, 40, 60),
|
|
||||||
tempo_fg: mauve,
|
|
||||||
bank_bg: Color::Rgb(35, 50, 55),
|
|
||||||
bank_fg: sapphire,
|
|
||||||
pattern_bg: Color::Rgb(40, 50, 50),
|
|
||||||
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(50, 30, 40),
|
|
||||||
error_fg: red,
|
|
||||||
success_bg: Color::Rgb(30, 50, 40),
|
|
||||||
success_fg: green,
|
|
||||||
info_bg: surface0,
|
|
||||||
info_fg: text,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(35, 55, 45),
|
|
||||||
playing_fg: green,
|
|
||||||
staged_play_bg: Color::Rgb(55, 45, 65),
|
|
||||||
staged_play_fg: mauve,
|
|
||||||
staged_stop_bg: Color::Rgb(60, 40, 50),
|
|
||||||
staged_stop_fg: maroon,
|
|
||||||
edit_bg: Color::Rgb(40, 55, 55),
|
|
||||||
edit_fg: teal,
|
|
||||||
hover_bg: surface1,
|
|
||||||
hover_fg: text,
|
|
||||||
muted_bg: Color::Rgb(40, 40, 50),
|
|
||||||
muted_fg: overlay0,
|
|
||||||
soloed_bg: Color::Rgb(60, 55, 35),
|
|
||||||
soloed_fg: yellow,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: red,
|
|
||||||
connected: green,
|
|
||||||
listening: yellow,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: mantle,
|
|
||||||
executed_bg: Color::Rgb(45, 40, 55),
|
|
||||||
selected_bg: Color::Rgb(70, 55, 40),
|
|
||||||
emit: (text, Color::Rgb(80, 50, 60)),
|
|
||||||
number: (peach, Color::Rgb(55, 45, 35)),
|
|
||||||
string: (green, Color::Rgb(35, 50, 40)),
|
|
||||||
comment: (overlay1, crust),
|
|
||||||
keyword: (mauve, Color::Rgb(50, 40, 60)),
|
|
||||||
stack_op: (sapphire, Color::Rgb(35, 45, 55)),
|
|
||||||
operator: (yellow, Color::Rgb(55, 50, 35)),
|
|
||||||
sound: (teal, Color::Rgb(35, 55, 55)),
|
|
||||||
param: (lavender, Color::Rgb(45, 45, 60)),
|
|
||||||
context: (peach, Color::Rgb(55, 45, 35)),
|
|
||||||
note: (green, Color::Rgb(35, 50, 40)),
|
|
||||||
interval: (Color::Rgb(180, 230, 150), Color::Rgb(40, 55, 35)),
|
|
||||||
variable: (pink, Color::Rgb(55, 40, 55)),
|
|
||||||
vary: (yellow, Color::Rgb(55, 50, 35)),
|
|
||||||
generator: (teal, Color::Rgb(35, 55, 50)),
|
|
||||||
user_defined: (maroon, Color::Rgb(55, 35, 40)),
|
|
||||||
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: crust,
|
|
||||||
},
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(60, 50, 75),
|
|
||||||
selected_fg: text,
|
|
||||||
unselected_bg: surface0,
|
|
||||||
unselected_fg: overlay1,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: text,
|
|
||||||
cursor_fg: crust,
|
|
||||||
selection_bg: Color::Rgb(50, 60, 90),
|
|
||||||
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: crust,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: sapphire,
|
|
||||||
h2: peach,
|
|
||||||
h3: mauve,
|
|
||||||
code: green,
|
|
||||||
code_border: Color::Rgb(60, 60, 70),
|
|
||||||
link: teal,
|
|
||||||
link_url: Color::Rgb(100, 100, 100),
|
|
||||||
quote: overlay1,
|
|
||||||
text,
|
|
||||||
list: text,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: Color::Rgb(100, 160, 180),
|
|
||||||
header_focused: yellow,
|
|
||||||
divider: Color::Rgb(60, 65, 70),
|
|
||||||
scroll_indicator: Color::Rgb(80, 85, 95),
|
|
||||||
label: Color::Rgb(120, 125, 135),
|
|
||||||
label_focused: Color::Rgb(150, 155, 165),
|
|
||||||
label_dim: Color::Rgb(100, 105, 115),
|
|
||||||
value: Color::Rgb(180, 180, 190),
|
|
||||||
focused: yellow,
|
|
||||||
normal: text,
|
|
||||||
dim: Color::Rgb(80, 85, 95),
|
|
||||||
path: Color::Rgb(120, 125, 135),
|
|
||||||
border_magenta: mauve,
|
|
||||||
border_green: green,
|
|
||||||
border_cyan: sapphire,
|
|
||||||
separator: Color::Rgb(60, 65, 75),
|
|
||||||
hint_active: Color::Rgb(180, 180, 100),
|
|
||||||
hint_inactive: Color::Rgb(60, 60, 70),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: green,
|
|
||||||
word_bg: Color::Rgb(40, 50, 60),
|
|
||||||
alias: overlay1,
|
|
||||||
stack_sig: mauve,
|
|
||||||
description: text,
|
|
||||||
example: Color::Rgb(120, 130, 140),
|
|
||||||
category_focused: yellow,
|
|
||||||
category_selected: sapphire,
|
|
||||||
category_normal: text,
|
|
||||||
category_dimmed: Color::Rgb(80, 80, 90),
|
|
||||||
border_focused: yellow,
|
|
||||||
border_normal: Color::Rgb(60, 60, 70),
|
|
||||||
header_desc: Color::Rgb(140, 145, 155),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: mauve,
|
|
||||||
author: lavender,
|
|
||||||
link: teal,
|
|
||||||
license: peach,
|
|
||||||
prompt: Color::Rgb(140, 160, 170),
|
|
||||||
subtitle: text,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: green,
|
|
||||||
mid: yellow,
|
|
||||||
high: red,
|
|
||||||
low_rgb: (40, 180, 80),
|
|
||||||
mid_rgb: (220, 180, 40),
|
|
||||||
high_rgb: (220, 60, 40),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(200, 220, 255),
|
|
||||||
(250, 179, 135),
|
|
||||||
(166, 227, 161),
|
|
||||||
(245, 194, 231),
|
|
||||||
(203, 166, 247),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: peach,
|
|
||||||
button_selected_bg: peach,
|
|
||||||
button_selected_fg: crust,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,284 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let background = Color::Rgb(40, 42, 54);
|
Palette {
|
||||||
let current_line = Color::Rgb(68, 71, 90);
|
bg: (40, 42, 54),
|
||||||
let foreground = Color::Rgb(248, 248, 242);
|
surface: (68, 71, 90),
|
||||||
let comment = Color::Rgb(98, 114, 164);
|
surface2: (55, 57, 70),
|
||||||
let cyan = Color::Rgb(139, 233, 253);
|
fg: (248, 248, 242),
|
||||||
let green = Color::Rgb(80, 250, 123);
|
fg_dim: (98, 114, 164),
|
||||||
let orange = Color::Rgb(255, 184, 108);
|
fg_muted: (80, 85, 110),
|
||||||
let pink = Color::Rgb(255, 121, 198);
|
accent: (189, 147, 249), // purple
|
||||||
let purple = Color::Rgb(189, 147, 249);
|
red: (255, 85, 85),
|
||||||
let red = Color::Rgb(255, 85, 85);
|
green: (80, 250, 123),
|
||||||
let yellow = Color::Rgb(241, 250, 140);
|
yellow: (241, 250, 140),
|
||||||
|
blue: (139, 233, 253), // cyan
|
||||||
let darker_bg = Color::Rgb(33, 34, 44);
|
purple: (189, 147, 249),
|
||||||
let lighter_bg = Color::Rgb(55, 57, 70);
|
cyan: (139, 233, 253),
|
||||||
|
orange: (255, 184, 108),
|
||||||
ThemeColors {
|
tempo_color: (189, 147, 249),
|
||||||
ui: UiColors {
|
bank_color: (139, 233, 253),
|
||||||
bg: background,
|
pattern_color: (80, 250, 123),
|
||||||
bg_rgb: (40, 42, 54),
|
title_accent: (189, 147, 249),
|
||||||
text_primary: foreground,
|
title_author: (255, 121, 198),
|
||||||
text_muted: comment,
|
secondary: (255, 184, 108),
|
||||||
text_dim: Color::Rgb(80, 85, 110),
|
link_bright: [
|
||||||
border: current_line,
|
(189, 147, 249), (255, 121, 198), (255, 184, 108),
|
||||||
header: purple,
|
(139, 233, 253), (80, 250, 123),
|
||||||
unfocused: comment,
|
],
|
||||||
accent: purple,
|
link_dim: [
|
||||||
surface: current_line,
|
(75, 60, 95), (95, 55, 80), (95, 70, 50),
|
||||||
},
|
(55, 90, 95), (40, 95, 55),
|
||||||
status: StatusColors {
|
],
|
||||||
playing_bg: Color::Rgb(40, 60, 50),
|
sparkle: [
|
||||||
playing_fg: green,
|
(189, 147, 249), (255, 184, 108), (80, 250, 123),
|
||||||
stopped_bg: Color::Rgb(65, 45, 50),
|
(255, 121, 198), (139, 233, 253),
|
||||||
stopped_fg: red,
|
],
|
||||||
fill_on: green,
|
meter: [(70, 230, 110), (230, 240, 130), (240, 80, 80)],
|
||||||
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,
|
|
||||||
content_bg: Color::Rgb(57, 77, 77),
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
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,
|
|
||||||
muted_bg: Color::Rgb(50, 52, 65),
|
|
||||||
muted_fg: comment,
|
|
||||||
soloed_bg: Color::Rgb(70, 70, 50),
|
|
||||||
soloed_fg: yellow,
|
|
||||||
},
|
|
||||||
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)),
|
|
||||||
user_defined: (orange, Color::Rgb(65, 55, 40)),
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,284 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(8, 12, 8);
|
Palette {
|
||||||
let surface = Color::Rgb(16, 24, 16);
|
bg: (8, 12, 8),
|
||||||
let surface2 = Color::Rgb(24, 32, 24);
|
surface: (16, 24, 16),
|
||||||
let border = Color::Rgb(32, 48, 32);
|
surface2: (32, 48, 32),
|
||||||
let fg = Color::Rgb(200, 216, 192);
|
fg: (200, 216, 192),
|
||||||
let fg_dim = Color::Rgb(122, 144, 112);
|
fg_dim: (122, 144, 112),
|
||||||
let fg_muted = Color::Rgb(64, 88, 56);
|
fg_muted: (64, 88, 56),
|
||||||
|
accent: (64, 192, 64), // green
|
||||||
let green = Color::Rgb(64, 192, 64);
|
red: (192, 80, 64),
|
||||||
let bright_green = Color::Rgb(96, 224, 96);
|
green: (96, 224, 96), // bright_green
|
||||||
let dark_green = Color::Rgb(48, 128, 48);
|
yellow: (160, 160, 64),
|
||||||
let cyan = Color::Rgb(80, 168, 144);
|
blue: (80, 128, 160),
|
||||||
let yellow = Color::Rgb(160, 160, 64);
|
purple: (128, 104, 144),
|
||||||
let red = Color::Rgb(192, 80, 64);
|
cyan: (80, 168, 144),
|
||||||
let orange = Color::Rgb(176, 128, 48);
|
orange: (176, 128, 48),
|
||||||
let blue = Color::Rgb(80, 128, 160);
|
tempo_color: (128, 104, 144),
|
||||||
let purple = Color::Rgb(128, 104, 144);
|
bank_color: (80, 128, 160),
|
||||||
|
pattern_color: (80, 168, 144),
|
||||||
ThemeColors {
|
title_accent: (64, 192, 64),
|
||||||
ui: UiColors {
|
title_author: (80, 168, 144),
|
||||||
bg,
|
secondary: (176, 128, 48),
|
||||||
bg_rgb: (8, 12, 8),
|
link_bright: [
|
||||||
text_primary: fg,
|
(64, 192, 64), (80, 168, 144), (160, 160, 64),
|
||||||
text_muted: fg_dim,
|
(80, 128, 160), (192, 80, 64),
|
||||||
text_dim: fg_muted,
|
],
|
||||||
border,
|
link_dim: [
|
||||||
header: green,
|
(14, 38, 14), (16, 34, 28), (32, 32, 14),
|
||||||
unfocused: fg_muted,
|
(16, 26, 32), (38, 16, 14),
|
||||||
accent: green,
|
],
|
||||||
surface,
|
sparkle: [
|
||||||
},
|
(64, 192, 64), (96, 224, 96), (80, 168, 144),
|
||||||
status: StatusColors {
|
(160, 160, 64), (48, 128, 48),
|
||||||
playing_bg: Color::Rgb(14, 30, 14),
|
],
|
||||||
playing_fg: bright_green,
|
meter: [(64, 192, 64), (160, 160, 64), (192, 80, 64)],
|
||||||
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,
|
|
||||||
content_bg: Color::Rgb(21, 35, 33),
|
|
||||||
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)),
|
|
||||||
user_defined: (orange, Color::Rgb(30, 22, 10)),
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,282 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(10, 8, 8);
|
Palette {
|
||||||
let surface = Color::Rgb(20, 16, 16);
|
bg: (10, 8, 8),
|
||||||
let surface2 = Color::Rgb(26, 20, 20);
|
surface: (20, 16, 16),
|
||||||
let border = Color::Rgb(42, 32, 32);
|
surface2: (42, 32, 32),
|
||||||
let fg = Color::Rgb(232, 221, 208);
|
fg: (232, 221, 208),
|
||||||
let fg_dim = Color::Rgb(160, 144, 128);
|
fg_dim: (160, 144, 128),
|
||||||
let fg_muted = Color::Rgb(96, 80, 64);
|
fg_muted: (96, 80, 64),
|
||||||
|
accent: (224, 128, 48), // orange
|
||||||
let red = Color::Rgb(224, 80, 64);
|
red: (224, 80, 64),
|
||||||
let orange = Color::Rgb(224, 128, 48);
|
green: (128, 160, 80),
|
||||||
let yellow = Color::Rgb(208, 160, 48);
|
yellow: (208, 160, 48),
|
||||||
let green = Color::Rgb(128, 160, 80);
|
blue: (96, 128, 176),
|
||||||
let cyan = Color::Rgb(112, 160, 160);
|
purple: (160, 112, 144),
|
||||||
let purple = Color::Rgb(160, 112, 144);
|
cyan: (112, 160, 160),
|
||||||
let blue = Color::Rgb(96, 128, 176);
|
orange: (224, 128, 48),
|
||||||
|
tempo_color: (160, 112, 144),
|
||||||
ThemeColors {
|
bank_color: (96, 128, 176),
|
||||||
ui: UiColors {
|
pattern_color: (112, 160, 160),
|
||||||
bg,
|
title_accent: (224, 128, 48),
|
||||||
bg_rgb: (10, 8, 8),
|
title_author: (224, 80, 64),
|
||||||
text_primary: fg,
|
secondary: (160, 112, 144),
|
||||||
text_muted: fg_dim,
|
link_bright: [
|
||||||
text_dim: fg_muted,
|
(224, 128, 48), (224, 80, 64), (208, 160, 48),
|
||||||
border,
|
(112, 160, 160), (128, 160, 80),
|
||||||
header: orange,
|
],
|
||||||
unfocused: fg_muted,
|
link_dim: [
|
||||||
accent: orange,
|
(45, 28, 14), (45, 18, 14), (42, 32, 12),
|
||||||
surface,
|
(22, 32, 32), (26, 32, 18),
|
||||||
},
|
],
|
||||||
status: StatusColors {
|
sparkle: [
|
||||||
playing_bg: Color::Rgb(20, 28, 16),
|
(224, 128, 48), (224, 80, 64), (208, 160, 48),
|
||||||
playing_fg: green,
|
(112, 160, 160), (128, 160, 80),
|
||||||
stopped_bg: Color::Rgb(40, 16, 14),
|
],
|
||||||
stopped_fg: red,
|
meter: [(128, 160, 80), (208, 160, 48), (224, 80, 64)],
|
||||||
fill_on: orange,
|
|
||||||
fill_off: fg_muted,
|
|
||||||
fill_bg: surface,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: orange,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selected_bg: Color::Rgb(50, 35, 20),
|
|
||||||
selected_fg: orange,
|
|
||||||
in_range_bg: Color::Rgb(35, 25, 18),
|
|
||||||
in_range_fg: fg,
|
|
||||||
cursor: orange,
|
|
||||||
selected: Color::Rgb(50, 35, 20),
|
|
||||||
in_range: Color::Rgb(35, 25, 18),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(45, 25, 15),
|
|
||||||
playing_active_fg: orange,
|
|
||||||
playing_inactive_bg: Color::Rgb(40, 32, 12),
|
|
||||||
playing_inactive_fg: yellow,
|
|
||||||
active_bg: Color::Rgb(20, 30, 30),
|
|
||||||
active_fg: cyan,
|
|
||||||
content_bg: Color::Rgb(27, 37, 37),
|
|
||||||
inactive_bg: surface,
|
|
||||||
inactive_fg: fg_dim,
|
|
||||||
active_selected_bg: Color::Rgb(40, 30, 35),
|
|
||||||
active_in_range_bg: Color::Rgb(30, 25, 25),
|
|
||||||
link_bright: [
|
|
||||||
(224, 128, 48),
|
|
||||||
(224, 80, 64),
|
|
||||||
(208, 160, 48),
|
|
||||||
(112, 160, 160),
|
|
||||||
(128, 160, 80),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(45, 28, 14),
|
|
||||||
(45, 18, 14),
|
|
||||||
(42, 32, 12),
|
|
||||||
(22, 32, 32),
|
|
||||||
(26, 32, 18),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(40, 28, 30),
|
|
||||||
tempo_fg: purple,
|
|
||||||
bank_bg: Color::Rgb(22, 30, 40),
|
|
||||||
bank_fg: blue,
|
|
||||||
pattern_bg: Color::Rgb(22, 34, 34),
|
|
||||||
pattern_fg: cyan,
|
|
||||||
stats_bg: surface,
|
|
||||||
stats_fg: fg_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: orange,
|
|
||||||
border_accent: red,
|
|
||||||
border_warn: yellow,
|
|
||||||
border_dim: fg_muted,
|
|
||||||
confirm: red,
|
|
||||||
rename: orange,
|
|
||||||
input: cyan,
|
|
||||||
editor: orange,
|
|
||||||
preview: fg_muted,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(50, 16, 14),
|
|
||||||
error_fg: red,
|
|
||||||
success_bg: Color::Rgb(20, 35, 18),
|
|
||||||
success_fg: green,
|
|
||||||
info_bg: surface,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(20, 35, 18),
|
|
||||||
playing_fg: green,
|
|
||||||
staged_play_bg: Color::Rgb(35, 25, 30),
|
|
||||||
staged_play_fg: purple,
|
|
||||||
staged_stop_bg: Color::Rgb(45, 18, 16),
|
|
||||||
staged_stop_fg: red,
|
|
||||||
edit_bg: Color::Rgb(20, 32, 32),
|
|
||||||
edit_fg: cyan,
|
|
||||||
hover_bg: surface2,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(18, 14, 14),
|
|
||||||
muted_fg: fg_muted,
|
|
||||||
soloed_bg: Color::Rgb(40, 32, 12),
|
|
||||||
soloed_fg: yellow,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: red,
|
|
||||||
connected: green,
|
|
||||||
listening: yellow,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: bg,
|
|
||||||
executed_bg: Color::Rgb(25, 18, 14),
|
|
||||||
selected_bg: Color::Rgb(45, 30, 15),
|
|
||||||
emit: (fg, Color::Rgb(45, 20, 18)),
|
|
||||||
number: (yellow, Color::Rgb(40, 30, 12)),
|
|
||||||
string: (green, Color::Rgb(25, 30, 18)),
|
|
||||||
comment: (fg_muted, bg),
|
|
||||||
keyword: (red, Color::Rgb(42, 18, 15)),
|
|
||||||
stack_op: (blue, Color::Rgb(22, 28, 38)),
|
|
||||||
operator: (orange, Color::Rgb(42, 26, 12)),
|
|
||||||
sound: (cyan, Color::Rgb(22, 32, 32)),
|
|
||||||
param: (purple, Color::Rgb(32, 24, 28)),
|
|
||||||
context: (orange, Color::Rgb(42, 26, 12)),
|
|
||||||
note: (green, Color::Rgb(25, 30, 18)),
|
|
||||||
interval: (Color::Rgb(150, 180, 100), Color::Rgb(28, 34, 20)),
|
|
||||||
variable: (purple, Color::Rgb(32, 24, 28)),
|
|
||||||
vary: (yellow, Color::Rgb(40, 30, 12)),
|
|
||||||
generator: (cyan, Color::Rgb(22, 32, 30)),
|
|
||||||
user_defined: (purple, Color::Rgb(28, 20, 26)),
|
|
||||||
default: (fg_dim, bg),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: bg,
|
|
||||||
row_odd: surface,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: orange,
|
|
||||||
value: fg_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: orange,
|
|
||||||
text: fg_muted,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(45, 30, 20),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: surface,
|
|
||||||
unselected_fg: fg_muted,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(50, 35, 25),
|
|
||||||
completion_bg: surface,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: orange,
|
|
||||||
completion_example: cyan,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: blue,
|
|
||||||
project_file: orange,
|
|
||||||
selected: red,
|
|
||||||
file: fg,
|
|
||||||
focused_border: orange,
|
|
||||||
unfocused_border: fg_muted,
|
|
||||||
root: fg,
|
|
||||||
file_icon: fg_muted,
|
|
||||||
folder_icon: blue,
|
|
||||||
empty_text: fg_muted,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: orange,
|
|
||||||
cursor: fg,
|
|
||||||
hint: fg_muted,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: orange,
|
|
||||||
inactive: fg_muted,
|
|
||||||
match_bg: yellow,
|
|
||||||
match_fg: bg,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: orange,
|
|
||||||
h2: red,
|
|
||||||
h3: purple,
|
|
||||||
code: green,
|
|
||||||
code_border: Color::Rgb(50, 38, 38),
|
|
||||||
link: cyan,
|
|
||||||
link_url: Color::Rgb(80, 68, 56),
|
|
||||||
quote: fg_muted,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: orange,
|
|
||||||
header_focused: yellow,
|
|
||||||
divider: Color::Rgb(38, 30, 30),
|
|
||||||
scroll_indicator: Color::Rgb(55, 42, 42),
|
|
||||||
label: Color::Rgb(130, 115, 100),
|
|
||||||
label_focused: Color::Rgb(170, 155, 140),
|
|
||||||
label_dim: Color::Rgb(90, 76, 64),
|
|
||||||
value: Color::Rgb(200, 188, 175),
|
|
||||||
focused: yellow,
|
|
||||||
normal: fg,
|
|
||||||
dim: Color::Rgb(55, 42, 42),
|
|
||||||
path: Color::Rgb(130, 115, 100),
|
|
||||||
border_magenta: purple,
|
|
||||||
border_green: green,
|
|
||||||
border_cyan: cyan,
|
|
||||||
separator: Color::Rgb(38, 30, 30),
|
|
||||||
hint_active: orange,
|
|
||||||
hint_inactive: Color::Rgb(38, 30, 30),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: green,
|
|
||||||
word_bg: Color::Rgb(22, 28, 22),
|
|
||||||
alias: fg_muted,
|
|
||||||
stack_sig: purple,
|
|
||||||
description: fg,
|
|
||||||
example: Color::Rgb(130, 115, 100),
|
|
||||||
category_focused: yellow,
|
|
||||||
category_selected: orange,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: Color::Rgb(55, 42, 42),
|
|
||||||
border_focused: yellow,
|
|
||||||
border_normal: Color::Rgb(38, 30, 30),
|
|
||||||
header_desc: Color::Rgb(145, 130, 115),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: orange,
|
|
||||||
author: red,
|
|
||||||
link: cyan,
|
|
||||||
license: yellow,
|
|
||||||
prompt: Color::Rgb(130, 115, 100),
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: green,
|
|
||||||
mid: yellow,
|
|
||||||
high: red,
|
|
||||||
low_rgb: (128, 160, 80),
|
|
||||||
mid_rgb: (208, 160, 48),
|
|
||||||
high_rgb: (224, 80, 64),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(224, 128, 48),
|
|
||||||
(224, 80, 64),
|
|
||||||
(208, 160, 48),
|
|
||||||
(112, 160, 160),
|
|
||||||
(128, 160, 80),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: red,
|
|
||||||
button_selected_bg: orange,
|
|
||||||
button_selected_fg: bg,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,282 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(90, 84, 117);
|
Palette {
|
||||||
let bg_light = Color::Rgb(113, 103, 153);
|
bg: (90, 84, 117),
|
||||||
let bg_lighter = Color::Rgb(130, 120, 165);
|
surface: (113, 103, 153),
|
||||||
let fg = Color::Rgb(248, 248, 240);
|
surface2: (130, 120, 165),
|
||||||
let fg_dim = Color::Rgb(197, 163, 255);
|
fg: (248, 248, 240),
|
||||||
let muted = Color::Rgb(168, 164, 177);
|
fg_dim: (197, 163, 255),
|
||||||
let dark = Color::Rgb(55, 51, 72);
|
fg_muted: (168, 164, 177),
|
||||||
|
accent: (255, 184, 209), // pink
|
||||||
let purple = Color::Rgb(174, 129, 255);
|
red: (255, 133, 127), // coral
|
||||||
let pink = Color::Rgb(255, 184, 209);
|
green: (194, 255, 223), // mint
|
||||||
let coral = Color::Rgb(255, 133, 127);
|
yellow: (255, 243, 82),
|
||||||
let yellow = Color::Rgb(255, 243, 82);
|
blue: (197, 163, 255), // lavender
|
||||||
let gold = Color::Rgb(230, 192, 0);
|
purple: (174, 129, 255),
|
||||||
let mint = Color::Rgb(194, 255, 223);
|
cyan: (194, 255, 223), // mint
|
||||||
let lavender = Color::Rgb(197, 163, 255);
|
orange: (255, 133, 127), // coral
|
||||||
|
tempo_color: (255, 184, 209),
|
||||||
ThemeColors {
|
bank_color: (194, 255, 223),
|
||||||
ui: UiColors {
|
pattern_color: (174, 129, 255),
|
||||||
bg,
|
title_accent: (255, 184, 209),
|
||||||
bg_rgb: (90, 84, 117),
|
title_author: (194, 255, 223),
|
||||||
text_primary: fg,
|
secondary: (255, 133, 127),
|
||||||
text_muted: fg_dim,
|
link_bright: [
|
||||||
text_dim: muted,
|
(255, 184, 209), (174, 129, 255), (255, 133, 127),
|
||||||
border: bg_lighter,
|
(194, 255, 223), (255, 243, 82),
|
||||||
header: mint,
|
],
|
||||||
unfocused: muted,
|
link_dim: [
|
||||||
accent: pink,
|
(100, 75, 90), (85, 70, 105), (100, 65, 65),
|
||||||
surface: bg_light,
|
(75, 100, 95), (100, 95, 55),
|
||||||
},
|
],
|
||||||
status: StatusColors {
|
sparkle: [
|
||||||
playing_bg: Color::Rgb(70, 95, 85),
|
(194, 255, 223), (255, 133, 127), (255, 243, 82),
|
||||||
playing_fg: mint,
|
(255, 184, 209), (174, 129, 255),
|
||||||
stopped_bg: Color::Rgb(100, 70, 85),
|
],
|
||||||
stopped_fg: coral,
|
meter: [(194, 255, 223), (255, 243, 82), (255, 133, 127)],
|
||||||
fill_on: mint,
|
|
||||||
fill_off: muted,
|
|
||||||
fill_bg: bg_light,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: pink,
|
|
||||||
cursor_fg: dark,
|
|
||||||
selected_bg: Color::Rgb(120, 90, 130),
|
|
||||||
selected_fg: pink,
|
|
||||||
in_range_bg: Color::Rgb(100, 95, 125),
|
|
||||||
in_range_fg: fg,
|
|
||||||
cursor: pink,
|
|
||||||
selected: Color::Rgb(120, 90, 130),
|
|
||||||
in_range: Color::Rgb(100, 95, 125),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(100, 85, 60),
|
|
||||||
playing_active_fg: gold,
|
|
||||||
playing_inactive_bg: Color::Rgb(95, 90, 70),
|
|
||||||
playing_inactive_fg: yellow,
|
|
||||||
active_bg: Color::Rgb(70, 100, 100),
|
|
||||||
active_fg: mint,
|
|
||||||
content_bg: Color::Rgb(77, 107, 107),
|
|
||||||
inactive_bg: bg_light,
|
|
||||||
inactive_fg: fg_dim,
|
|
||||||
active_selected_bg: Color::Rgb(120, 90, 130),
|
|
||||||
active_in_range_bg: Color::Rgb(100, 95, 125),
|
|
||||||
link_bright: [
|
|
||||||
(255, 184, 209),
|
|
||||||
(174, 129, 255),
|
|
||||||
(255, 133, 127),
|
|
||||||
(194, 255, 223),
|
|
||||||
(255, 243, 82),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(100, 75, 90),
|
|
||||||
(85, 70, 105),
|
|
||||||
(100, 65, 65),
|
|
||||||
(75, 100, 95),
|
|
||||||
(100, 95, 55),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(100, 75, 95),
|
|
||||||
tempo_fg: pink,
|
|
||||||
bank_bg: Color::Rgb(70, 95, 95),
|
|
||||||
bank_fg: mint,
|
|
||||||
pattern_bg: Color::Rgb(85, 75, 110),
|
|
||||||
pattern_fg: purple,
|
|
||||||
stats_bg: bg_light,
|
|
||||||
stats_fg: fg_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: mint,
|
|
||||||
border_accent: pink,
|
|
||||||
border_warn: coral,
|
|
||||||
border_dim: muted,
|
|
||||||
confirm: coral,
|
|
||||||
rename: purple,
|
|
||||||
input: mint,
|
|
||||||
editor: mint,
|
|
||||||
preview: muted,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(100, 65, 70),
|
|
||||||
error_fg: coral,
|
|
||||||
success_bg: Color::Rgb(65, 95, 85),
|
|
||||||
success_fg: mint,
|
|
||||||
info_bg: bg_light,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(65, 95, 85),
|
|
||||||
playing_fg: mint,
|
|
||||||
staged_play_bg: Color::Rgb(95, 80, 120),
|
|
||||||
staged_play_fg: purple,
|
|
||||||
staged_stop_bg: Color::Rgb(105, 70, 85),
|
|
||||||
staged_stop_fg: pink,
|
|
||||||
edit_bg: Color::Rgb(70, 95, 100),
|
|
||||||
edit_fg: mint,
|
|
||||||
hover_bg: bg_lighter,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(75, 70, 95),
|
|
||||||
muted_fg: muted,
|
|
||||||
soloed_bg: Color::Rgb(100, 95, 65),
|
|
||||||
soloed_fg: yellow,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: coral,
|
|
||||||
connected: mint,
|
|
||||||
listening: yellow,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: dark,
|
|
||||||
executed_bg: Color::Rgb(80, 75, 100),
|
|
||||||
selected_bg: Color::Rgb(110, 100, 70),
|
|
||||||
emit: (fg, Color::Rgb(110, 80, 100)),
|
|
||||||
number: (purple, Color::Rgb(85, 75, 110)),
|
|
||||||
string: (yellow, Color::Rgb(100, 95, 60)),
|
|
||||||
comment: (muted, dark),
|
|
||||||
keyword: (pink, Color::Rgb(105, 75, 90)),
|
|
||||||
stack_op: (mint, Color::Rgb(70, 100, 95)),
|
|
||||||
operator: (pink, Color::Rgb(105, 75, 90)),
|
|
||||||
sound: (mint, Color::Rgb(70, 100, 95)),
|
|
||||||
param: (coral, Color::Rgb(105, 70, 70)),
|
|
||||||
context: (coral, Color::Rgb(105, 70, 70)),
|
|
||||||
note: (lavender, Color::Rgb(85, 75, 110)),
|
|
||||||
interval: (Color::Rgb(220, 190, 255), Color::Rgb(85, 75, 100)),
|
|
||||||
variable: (lavender, Color::Rgb(85, 75, 110)),
|
|
||||||
vary: (yellow, Color::Rgb(100, 95, 60)),
|
|
||||||
generator: (mint, Color::Rgb(70, 95, 95)),
|
|
||||||
user_defined: (coral, Color::Rgb(100, 75, 75)),
|
|
||||||
default: (fg_dim, dark),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: dark,
|
|
||||||
row_odd: bg,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: coral,
|
|
||||||
value: fg_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: coral,
|
|
||||||
text: muted,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(110, 85, 120),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: bg_light,
|
|
||||||
unselected_fg: muted,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(105, 95, 125),
|
|
||||||
completion_bg: bg_light,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: coral,
|
|
||||||
completion_example: mint,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: mint,
|
|
||||||
project_file: purple,
|
|
||||||
selected: coral,
|
|
||||||
file: fg,
|
|
||||||
focused_border: coral,
|
|
||||||
unfocused_border: muted,
|
|
||||||
root: fg,
|
|
||||||
file_icon: muted,
|
|
||||||
folder_icon: mint,
|
|
||||||
empty_text: muted,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: mint,
|
|
||||||
cursor: fg,
|
|
||||||
hint: muted,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: coral,
|
|
||||||
inactive: muted,
|
|
||||||
match_bg: yellow,
|
|
||||||
match_fg: dark,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: mint,
|
|
||||||
h2: coral,
|
|
||||||
h3: purple,
|
|
||||||
code: lavender,
|
|
||||||
code_border: Color::Rgb(120, 115, 140),
|
|
||||||
link: pink,
|
|
||||||
link_url: Color::Rgb(150, 145, 165),
|
|
||||||
quote: muted,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: mint,
|
|
||||||
header_focused: yellow,
|
|
||||||
divider: Color::Rgb(110, 105, 130),
|
|
||||||
scroll_indicator: Color::Rgb(125, 120, 145),
|
|
||||||
label: Color::Rgb(175, 170, 190),
|
|
||||||
label_focused: Color::Rgb(210, 205, 225),
|
|
||||||
label_dim: Color::Rgb(145, 140, 160),
|
|
||||||
value: Color::Rgb(230, 225, 240),
|
|
||||||
focused: yellow,
|
|
||||||
normal: fg,
|
|
||||||
dim: Color::Rgb(125, 120, 145),
|
|
||||||
path: Color::Rgb(175, 170, 190),
|
|
||||||
border_magenta: pink,
|
|
||||||
border_green: mint,
|
|
||||||
border_cyan: lavender,
|
|
||||||
separator: Color::Rgb(110, 105, 130),
|
|
||||||
hint_active: Color::Rgb(240, 230, 120),
|
|
||||||
hint_inactive: Color::Rgb(110, 105, 130),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: lavender,
|
|
||||||
word_bg: Color::Rgb(75, 85, 105),
|
|
||||||
alias: muted,
|
|
||||||
stack_sig: purple,
|
|
||||||
description: fg,
|
|
||||||
example: Color::Rgb(175, 170, 190),
|
|
||||||
category_focused: yellow,
|
|
||||||
category_selected: mint,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: Color::Rgb(125, 120, 145),
|
|
||||||
border_focused: yellow,
|
|
||||||
border_normal: Color::Rgb(110, 105, 130),
|
|
||||||
header_desc: Color::Rgb(195, 190, 210),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: pink,
|
|
||||||
author: mint,
|
|
||||||
link: lavender,
|
|
||||||
license: coral,
|
|
||||||
prompt: Color::Rgb(195, 190, 210),
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: mint,
|
|
||||||
mid: yellow,
|
|
||||||
high: coral,
|
|
||||||
low_rgb: (194, 255, 223),
|
|
||||||
mid_rgb: (255, 243, 82),
|
|
||||||
high_rgb: (255, 133, 127),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(194, 255, 223),
|
|
||||||
(255, 133, 127),
|
|
||||||
(255, 243, 82),
|
|
||||||
(255, 184, 209),
|
|
||||||
(174, 129, 255),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: coral,
|
|
||||||
button_selected_bg: coral,
|
|
||||||
button_selected_fg: dark,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,286 +1,40 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
// C64 palette on pure black
|
// C64 palette on pure black
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(0, 0, 0);
|
Palette {
|
||||||
let surface = Color::Rgb(16, 16, 16);
|
bg: (0, 0, 0),
|
||||||
let surface2 = Color::Rgb(24, 24, 24);
|
surface: (16, 16, 16),
|
||||||
let border = Color::Rgb(51, 51, 51);
|
surface2: (24, 24, 24),
|
||||||
let fg = Color::Rgb(187, 187, 187);
|
fg: (187, 187, 187),
|
||||||
let fg_dim = Color::Rgb(119, 119, 119);
|
fg_dim: (119, 119, 119),
|
||||||
let fg_muted = Color::Rgb(51, 51, 51);
|
fg_muted: (51, 51, 51),
|
||||||
|
accent: (0, 136, 255), // lightblue
|
||||||
let white = Color::Rgb(255, 255, 255);
|
red: (255, 119, 119), // lightred
|
||||||
let lightred = Color::Rgb(255, 119, 119);
|
green: (0, 204, 85),
|
||||||
let cyan = Color::Rgb(170, 255, 238);
|
yellow: (238, 238, 119),
|
||||||
let violet = Color::Rgb(204, 68, 204);
|
blue: (0, 136, 255), // lightblue
|
||||||
let green = Color::Rgb(0, 204, 85);
|
purple: (204, 68, 204), // violet
|
||||||
let lightgreen = Color::Rgb(170, 255, 102);
|
cyan: (170, 255, 238),
|
||||||
let lightblue = Color::Rgb(0, 136, 255);
|
orange: (221, 136, 85),
|
||||||
let yellow = Color::Rgb(238, 238, 119);
|
tempo_color: (204, 68, 204),
|
||||||
let orange = Color::Rgb(221, 136, 85);
|
bank_color: (0, 136, 255),
|
||||||
let brown = Color::Rgb(102, 68, 0);
|
pattern_color: (0, 204, 85),
|
||||||
|
title_accent: (0, 136, 255),
|
||||||
ThemeColors {
|
title_author: (0, 204, 85),
|
||||||
ui: UiColors {
|
secondary: (221, 136, 85),
|
||||||
bg,
|
link_bright: [
|
||||||
bg_rgb: (0, 0, 0),
|
(0, 136, 255), (0, 204, 85), (238, 238, 119),
|
||||||
text_primary: fg,
|
(204, 68, 204), (170, 255, 238),
|
||||||
text_muted: fg_dim,
|
],
|
||||||
text_dim: fg_muted,
|
link_dim: [
|
||||||
border,
|
(0, 20, 40), (0, 30, 12), (34, 34, 16),
|
||||||
header: lightblue,
|
(30, 10, 30), (24, 36, 34),
|
||||||
unfocused: fg_muted,
|
],
|
||||||
accent: lightblue,
|
sparkle: [
|
||||||
surface,
|
(0, 136, 255), (170, 255, 238), (0, 204, 85),
|
||||||
},
|
(238, 238, 119), (204, 68, 204),
|
||||||
status: StatusColors {
|
],
|
||||||
playing_bg: Color::Rgb(0, 24, 10),
|
meter: [(0, 204, 85), (238, 238, 119), (255, 119, 119)],
|
||||||
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,
|
|
||||||
content_bg: Color::Rgb(7, 23, 39),
|
|
||||||
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)),
|
|
||||||
user_defined: (orange, Color::Rgb(30, 20, 10)),
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,283 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg0 = Color::Rgb(40, 40, 40);
|
Palette {
|
||||||
let bg1 = Color::Rgb(60, 56, 54);
|
bg: (40, 40, 40),
|
||||||
let bg2 = Color::Rgb(80, 73, 69);
|
surface: (60, 56, 54),
|
||||||
let fg = Color::Rgb(235, 219, 178);
|
surface2: (80, 73, 69),
|
||||||
let fg2 = Color::Rgb(213, 196, 161);
|
fg: (235, 219, 178),
|
||||||
let fg3 = Color::Rgb(189, 174, 147);
|
fg_dim: (189, 174, 147),
|
||||||
let fg4 = Color::Rgb(168, 153, 132);
|
fg_muted: (168, 153, 132),
|
||||||
let red = Color::Rgb(251, 73, 52);
|
accent: (254, 128, 25), // orange
|
||||||
let green = Color::Rgb(184, 187, 38);
|
red: (251, 73, 52),
|
||||||
let yellow = Color::Rgb(250, 189, 47);
|
green: (184, 187, 38),
|
||||||
let blue = Color::Rgb(131, 165, 152);
|
yellow: (250, 189, 47),
|
||||||
let purple = Color::Rgb(211, 134, 155);
|
blue: (131, 165, 152),
|
||||||
let aqua = Color::Rgb(142, 192, 124);
|
purple: (211, 134, 155),
|
||||||
let orange = Color::Rgb(254, 128, 25);
|
cyan: (142, 192, 124), // aqua
|
||||||
|
orange: (254, 128, 25),
|
||||||
let darker_bg = Color::Rgb(29, 32, 33);
|
tempo_color: (254, 128, 25),
|
||||||
|
bank_color: (131, 165, 152),
|
||||||
ThemeColors {
|
pattern_color: (142, 192, 124),
|
||||||
ui: UiColors {
|
title_accent: (254, 128, 25),
|
||||||
bg: bg0,
|
title_author: (250, 189, 47),
|
||||||
bg_rgb: (40, 40, 40),
|
secondary: (254, 128, 25),
|
||||||
text_primary: fg,
|
link_bright: [
|
||||||
text_muted: fg3,
|
(254, 128, 25), (211, 134, 155), (250, 189, 47),
|
||||||
text_dim: fg4,
|
(131, 165, 152), (184, 187, 38),
|
||||||
border: bg2,
|
],
|
||||||
header: yellow,
|
link_dim: [
|
||||||
unfocused: fg4,
|
(85, 55, 35), (75, 55, 65), (80, 70, 40),
|
||||||
accent: orange,
|
(50, 60, 60), (60, 65, 35),
|
||||||
surface: bg1,
|
],
|
||||||
},
|
sparkle: [
|
||||||
status: StatusColors {
|
(250, 189, 47), (254, 128, 25), (184, 187, 38),
|
||||||
playing_bg: Color::Rgb(50, 60, 45),
|
(211, 134, 155), (131, 165, 152),
|
||||||
playing_fg: green,
|
],
|
||||||
stopped_bg: Color::Rgb(65, 45, 45),
|
meter: [(170, 175, 35), (235, 180, 45), (240, 70, 50)],
|
||||||
stopped_fg: red,
|
|
||||||
fill_on: green,
|
|
||||||
fill_off: fg4,
|
|
||||||
fill_bg: bg1,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: orange,
|
|
||||||
cursor_fg: bg0,
|
|
||||||
selected_bg: Color::Rgb(80, 70, 55),
|
|
||||||
selected_fg: yellow,
|
|
||||||
in_range_bg: Color::Rgb(65, 60, 50),
|
|
||||||
in_range_fg: fg2,
|
|
||||||
cursor: orange,
|
|
||||||
selected: Color::Rgb(80, 70, 55),
|
|
||||||
in_range: Color::Rgb(65, 60, 50),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(90, 65, 50),
|
|
||||||
playing_active_fg: orange,
|
|
||||||
playing_inactive_bg: Color::Rgb(80, 75, 45),
|
|
||||||
playing_inactive_fg: yellow,
|
|
||||||
active_bg: Color::Rgb(50, 65, 55),
|
|
||||||
active_fg: aqua,
|
|
||||||
content_bg: Color::Rgb(57, 72, 62),
|
|
||||||
inactive_bg: bg1,
|
|
||||||
inactive_fg: fg3,
|
|
||||||
active_selected_bg: Color::Rgb(85, 70, 60),
|
|
||||||
active_in_range_bg: Color::Rgb(70, 65, 55),
|
|
||||||
link_bright: [
|
|
||||||
(254, 128, 25),
|
|
||||||
(211, 134, 155),
|
|
||||||
(250, 189, 47),
|
|
||||||
(131, 165, 152),
|
|
||||||
(184, 187, 38),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(85, 55, 35),
|
|
||||||
(75, 55, 65),
|
|
||||||
(80, 70, 40),
|
|
||||||
(50, 60, 60),
|
|
||||||
(60, 65, 35),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(75, 55, 40),
|
|
||||||
tempo_fg: orange,
|
|
||||||
bank_bg: Color::Rgb(50, 60, 60),
|
|
||||||
bank_fg: blue,
|
|
||||||
pattern_bg: Color::Rgb(50, 65, 50),
|
|
||||||
pattern_fg: aqua,
|
|
||||||
stats_bg: bg1,
|
|
||||||
stats_fg: fg3,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: yellow,
|
|
||||||
border_accent: orange,
|
|
||||||
border_warn: red,
|
|
||||||
border_dim: fg4,
|
|
||||||
confirm: orange,
|
|
||||||
rename: purple,
|
|
||||||
input: blue,
|
|
||||||
editor: yellow,
|
|
||||||
preview: fg4,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(70, 45, 45),
|
|
||||||
error_fg: red,
|
|
||||||
success_bg: Color::Rgb(50, 65, 45),
|
|
||||||
success_fg: green,
|
|
||||||
info_bg: bg1,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(50, 65, 45),
|
|
||||||
playing_fg: green,
|
|
||||||
staged_play_bg: Color::Rgb(70, 55, 60),
|
|
||||||
staged_play_fg: purple,
|
|
||||||
staged_stop_bg: Color::Rgb(75, 50, 50),
|
|
||||||
staged_stop_fg: red,
|
|
||||||
edit_bg: Color::Rgb(50, 65, 55),
|
|
||||||
edit_fg: aqua,
|
|
||||||
hover_bg: bg2,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(50, 50, 55),
|
|
||||||
muted_fg: fg4,
|
|
||||||
soloed_bg: Color::Rgb(70, 65, 40),
|
|
||||||
soloed_fg: yellow,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: red,
|
|
||||||
connected: green,
|
|
||||||
listening: yellow,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: darker_bg,
|
|
||||||
executed_bg: Color::Rgb(55, 50, 45),
|
|
||||||
selected_bg: Color::Rgb(85, 70, 45),
|
|
||||||
emit: (fg, Color::Rgb(80, 55, 50)),
|
|
||||||
number: (orange, Color::Rgb(70, 50, 40)),
|
|
||||||
string: (green, Color::Rgb(50, 60, 40)),
|
|
||||||
comment: (fg4, darker_bg),
|
|
||||||
keyword: (red, Color::Rgb(70, 45, 45)),
|
|
||||||
stack_op: (blue, Color::Rgb(50, 55, 60)),
|
|
||||||
operator: (yellow, Color::Rgb(70, 65, 40)),
|
|
||||||
sound: (aqua, Color::Rgb(45, 60, 50)),
|
|
||||||
param: (purple, Color::Rgb(65, 50, 55)),
|
|
||||||
context: (orange, Color::Rgb(70, 50, 40)),
|
|
||||||
note: (green, Color::Rgb(50, 60, 40)),
|
|
||||||
interval: (Color::Rgb(170, 200, 100), Color::Rgb(55, 65, 40)),
|
|
||||||
variable: (purple, Color::Rgb(65, 50, 55)),
|
|
||||||
vary: (yellow, Color::Rgb(70, 65, 40)),
|
|
||||||
generator: (aqua, Color::Rgb(45, 60, 50)),
|
|
||||||
user_defined: (orange, Color::Rgb(60, 45, 30)),
|
|
||||||
default: (fg3, darker_bg),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: darker_bg,
|
|
||||||
row_odd: bg0,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: orange,
|
|
||||||
value: fg3,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: orange,
|
|
||||||
text: fg4,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg0 },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(80, 65, 50),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: bg1,
|
|
||||||
unselected_fg: fg4,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg0,
|
|
||||||
selection_bg: Color::Rgb(70, 65, 55),
|
|
||||||
completion_bg: bg1,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: orange,
|
|
||||||
completion_example: aqua,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: blue,
|
|
||||||
project_file: purple,
|
|
||||||
selected: orange,
|
|
||||||
file: fg,
|
|
||||||
focused_border: orange,
|
|
||||||
unfocused_border: fg4,
|
|
||||||
root: fg,
|
|
||||||
file_icon: fg4,
|
|
||||||
folder_icon: blue,
|
|
||||||
empty_text: fg4,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: blue,
|
|
||||||
cursor: fg,
|
|
||||||
hint: fg4,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: orange,
|
|
||||||
inactive: fg4,
|
|
||||||
match_bg: yellow,
|
|
||||||
match_fg: bg0,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: blue,
|
|
||||||
h2: orange,
|
|
||||||
h3: purple,
|
|
||||||
code: green,
|
|
||||||
code_border: Color::Rgb(80, 75, 70),
|
|
||||||
link: aqua,
|
|
||||||
link_url: Color::Rgb(120, 115, 105),
|
|
||||||
quote: fg4,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: blue,
|
|
||||||
header_focused: yellow,
|
|
||||||
divider: Color::Rgb(75, 70, 65),
|
|
||||||
scroll_indicator: Color::Rgb(90, 85, 80),
|
|
||||||
label: Color::Rgb(145, 135, 125),
|
|
||||||
label_focused: Color::Rgb(175, 165, 155),
|
|
||||||
label_dim: Color::Rgb(115, 105, 95),
|
|
||||||
value: Color::Rgb(200, 190, 175),
|
|
||||||
focused: yellow,
|
|
||||||
normal: fg,
|
|
||||||
dim: Color::Rgb(90, 85, 80),
|
|
||||||
path: Color::Rgb(145, 135, 125),
|
|
||||||
border_magenta: purple,
|
|
||||||
border_green: green,
|
|
||||||
border_cyan: aqua,
|
|
||||||
separator: Color::Rgb(75, 70, 65),
|
|
||||||
hint_active: Color::Rgb(220, 180, 80),
|
|
||||||
hint_inactive: Color::Rgb(75, 70, 65),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: green,
|
|
||||||
word_bg: Color::Rgb(55, 60, 55),
|
|
||||||
alias: fg4,
|
|
||||||
stack_sig: purple,
|
|
||||||
description: fg,
|
|
||||||
example: Color::Rgb(145, 135, 125),
|
|
||||||
category_focused: yellow,
|
|
||||||
category_selected: blue,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: Color::Rgb(90, 85, 80),
|
|
||||||
border_focused: yellow,
|
|
||||||
border_normal: Color::Rgb(75, 70, 65),
|
|
||||||
header_desc: Color::Rgb(165, 155, 145),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: orange,
|
|
||||||
author: yellow,
|
|
||||||
link: aqua,
|
|
||||||
license: purple,
|
|
||||||
prompt: Color::Rgb(165, 155, 145),
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: green,
|
|
||||||
mid: yellow,
|
|
||||||
high: red,
|
|
||||||
low_rgb: (170, 175, 35),
|
|
||||||
mid_rgb: (235, 180, 45),
|
|
||||||
high_rgb: (240, 70, 50),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(250, 189, 47),
|
|
||||||
(254, 128, 25),
|
|
||||||
(184, 187, 38),
|
|
||||||
(211, 134, 155),
|
|
||||||
(131, 165, 152),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: orange,
|
|
||||||
button_selected_bg: orange,
|
|
||||||
button_selected_fg: bg0,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,278 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let red = Color::Rgb(255, 0, 0);
|
Palette {
|
||||||
let dark_red = Color::Rgb(215, 0, 0);
|
bg: (255, 0, 0),
|
||||||
let darker_red = Color::Rgb(175, 0, 0);
|
surface: (215, 0, 0),
|
||||||
let yellow = Color::Rgb(255, 255, 0);
|
surface2: (175, 0, 0),
|
||||||
let light_yellow = Color::Rgb(255, 255, 95);
|
fg: (255, 255, 0),
|
||||||
let gold = Color::Rgb(255, 215, 0);
|
fg_dim: (255, 255, 95),
|
||||||
let black = Color::Rgb(0, 0, 0);
|
fg_muted: (255, 215, 0),
|
||||||
let white = Color::Rgb(255, 255, 255);
|
accent: (255, 255, 0),
|
||||||
|
red: (255, 255, 255),
|
||||||
let dim_yellow = Color::Rgb(180, 180, 0);
|
green: (255, 255, 0),
|
||||||
let muted_red = Color::Rgb(140, 40, 40);
|
yellow: (255, 215, 0),
|
||||||
|
blue: (255, 255, 0),
|
||||||
ThemeColors {
|
purple: (255, 255, 255),
|
||||||
ui: UiColors {
|
cyan: (255, 255, 0),
|
||||||
bg: red,
|
orange: (255, 215, 0),
|
||||||
bg_rgb: (255, 0, 0),
|
tempo_color: (255, 255, 0),
|
||||||
text_primary: yellow,
|
bank_color: (255, 255, 0),
|
||||||
text_muted: light_yellow,
|
pattern_color: (255, 255, 0),
|
||||||
text_dim: gold,
|
title_accent: (255, 255, 0),
|
||||||
border: yellow,
|
title_author: (255, 255, 255),
|
||||||
header: yellow,
|
secondary: (255, 215, 0),
|
||||||
unfocused: gold,
|
link_bright: [
|
||||||
accent: yellow,
|
(255, 255, 0), (255, 255, 255), (255, 215, 0),
|
||||||
surface: dark_red,
|
(255, 255, 95), (255, 255, 0),
|
||||||
},
|
],
|
||||||
status: StatusColors {
|
link_dim: [
|
||||||
playing_bg: Color::Rgb(180, 180, 0),
|
(140, 140, 0), (140, 140, 140), (140, 120, 0),
|
||||||
playing_fg: black,
|
(140, 140, 60), (140, 140, 0),
|
||||||
stopped_bg: darker_red,
|
],
|
||||||
stopped_fg: yellow,
|
sparkle: [
|
||||||
fill_on: yellow,
|
(255, 255, 0), (255, 255, 255), (255, 215, 0),
|
||||||
fill_off: gold,
|
(255, 255, 95), (255, 255, 0),
|
||||||
fill_bg: dark_red,
|
],
|
||||||
},
|
meter: [(255, 255, 0), (255, 215, 0), (255, 255, 255)],
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: yellow,
|
|
||||||
cursor_fg: red,
|
|
||||||
selected_bg: Color::Rgb(200, 200, 0),
|
|
||||||
selected_fg: black,
|
|
||||||
in_range_bg: Color::Rgb(170, 100, 0),
|
|
||||||
in_range_fg: yellow,
|
|
||||||
cursor: yellow,
|
|
||||||
selected: Color::Rgb(200, 200, 0),
|
|
||||||
in_range: Color::Rgb(170, 100, 0),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(200, 200, 0),
|
|
||||||
playing_active_fg: black,
|
|
||||||
playing_inactive_bg: Color::Rgb(180, 180, 0),
|
|
||||||
playing_inactive_fg: black,
|
|
||||||
active_bg: Color::Rgb(200, 50, 50),
|
|
||||||
active_fg: yellow,
|
|
||||||
content_bg: Color::Rgb(210, 60, 60),
|
|
||||||
inactive_bg: dark_red,
|
|
||||||
inactive_fg: gold,
|
|
||||||
active_selected_bg: Color::Rgb(200, 200, 0),
|
|
||||||
active_in_range_bg: Color::Rgb(170, 100, 0),
|
|
||||||
link_bright: [
|
|
||||||
(255, 255, 0),
|
|
||||||
(255, 255, 255),
|
|
||||||
(255, 215, 0),
|
|
||||||
(255, 255, 95),
|
|
||||||
(255, 255, 0),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(140, 140, 0),
|
|
||||||
(140, 140, 140),
|
|
||||||
(140, 120, 0),
|
|
||||||
(140, 140, 60),
|
|
||||||
(140, 140, 0),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(180, 180, 0),
|
|
||||||
tempo_fg: black,
|
|
||||||
bank_bg: darker_red,
|
|
||||||
bank_fg: yellow,
|
|
||||||
pattern_bg: Color::Rgb(200, 200, 0),
|
|
||||||
pattern_fg: black,
|
|
||||||
stats_bg: dark_red,
|
|
||||||
stats_fg: yellow,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: yellow,
|
|
||||||
border_accent: white,
|
|
||||||
border_warn: gold,
|
|
||||||
border_dim: dim_yellow,
|
|
||||||
confirm: gold,
|
|
||||||
rename: light_yellow,
|
|
||||||
input: yellow,
|
|
||||||
editor: yellow,
|
|
||||||
preview: gold,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: black,
|
|
||||||
error_fg: yellow,
|
|
||||||
success_bg: Color::Rgb(180, 180, 0),
|
|
||||||
success_fg: black,
|
|
||||||
info_bg: dark_red,
|
|
||||||
info_fg: yellow,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(180, 180, 0),
|
|
||||||
playing_fg: black,
|
|
||||||
staged_play_bg: Color::Rgb(200, 200, 0),
|
|
||||||
staged_play_fg: black,
|
|
||||||
staged_stop_bg: darker_red,
|
|
||||||
staged_stop_fg: yellow,
|
|
||||||
edit_bg: Color::Rgb(200, 50, 50),
|
|
||||||
edit_fg: yellow,
|
|
||||||
hover_bg: Color::Rgb(230, 50, 50),
|
|
||||||
hover_fg: yellow,
|
|
||||||
muted_bg: darker_red,
|
|
||||||
muted_fg: dim_yellow,
|
|
||||||
soloed_bg: Color::Rgb(200, 200, 0),
|
|
||||||
soloed_fg: black,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: white,
|
|
||||||
connected: yellow,
|
|
||||||
listening: gold,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: darker_red,
|
|
||||||
executed_bg: Color::Rgb(200, 50, 50),
|
|
||||||
selected_bg: Color::Rgb(180, 180, 0),
|
|
||||||
emit: (yellow, muted_red),
|
|
||||||
number: (white, muted_red),
|
|
||||||
string: (gold, muted_red),
|
|
||||||
comment: (dim_yellow, darker_red),
|
|
||||||
keyword: (light_yellow, muted_red),
|
|
||||||
stack_op: (yellow, muted_red),
|
|
||||||
operator: (light_yellow, muted_red),
|
|
||||||
sound: (yellow, muted_red),
|
|
||||||
param: (gold, muted_red),
|
|
||||||
context: (gold, muted_red),
|
|
||||||
note: (white, muted_red),
|
|
||||||
interval: (Color::Rgb(255, 240, 150), muted_red),
|
|
||||||
variable: (white, muted_red),
|
|
||||||
vary: (gold, muted_red),
|
|
||||||
generator: (yellow, muted_red),
|
|
||||||
user_defined: (gold, Color::Rgb(100, 70, 0)),
|
|
||||||
default: (light_yellow, darker_red),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: darker_red,
|
|
||||||
row_odd: red,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: gold,
|
|
||||||
value: light_yellow,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: white,
|
|
||||||
text: gold,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: yellow, fg: red },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(200, 200, 0),
|
|
||||||
selected_fg: black,
|
|
||||||
unselected_bg: dark_red,
|
|
||||||
unselected_fg: gold,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: yellow,
|
|
||||||
cursor_fg: red,
|
|
||||||
selection_bg: Color::Rgb(180, 180, 0),
|
|
||||||
completion_bg: dark_red,
|
|
||||||
completion_fg: yellow,
|
|
||||||
completion_selected: white,
|
|
||||||
completion_example: gold,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: yellow,
|
|
||||||
project_file: white,
|
|
||||||
selected: gold,
|
|
||||||
file: light_yellow,
|
|
||||||
focused_border: white,
|
|
||||||
unfocused_border: gold,
|
|
||||||
root: yellow,
|
|
||||||
file_icon: gold,
|
|
||||||
folder_icon: yellow,
|
|
||||||
empty_text: gold,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: yellow,
|
|
||||||
cursor: white,
|
|
||||||
hint: gold,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: white,
|
|
||||||
inactive: gold,
|
|
||||||
match_bg: yellow,
|
|
||||||
match_fg: red,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: yellow,
|
|
||||||
h2: white,
|
|
||||||
h3: gold,
|
|
||||||
code: light_yellow,
|
|
||||||
code_border: dim_yellow,
|
|
||||||
link: white,
|
|
||||||
link_url: gold,
|
|
||||||
quote: dim_yellow,
|
|
||||||
text: yellow,
|
|
||||||
list: yellow,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: yellow,
|
|
||||||
header_focused: white,
|
|
||||||
divider: dim_yellow,
|
|
||||||
scroll_indicator: gold,
|
|
||||||
label: light_yellow,
|
|
||||||
label_focused: white,
|
|
||||||
label_dim: dim_yellow,
|
|
||||||
value: yellow,
|
|
||||||
focused: white,
|
|
||||||
normal: yellow,
|
|
||||||
dim: dim_yellow,
|
|
||||||
path: gold,
|
|
||||||
border_magenta: gold,
|
|
||||||
border_green: yellow,
|
|
||||||
border_cyan: white,
|
|
||||||
separator: dim_yellow,
|
|
||||||
hint_active: white,
|
|
||||||
hint_inactive: dim_yellow,
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: yellow,
|
|
||||||
word_bg: darker_red,
|
|
||||||
alias: gold,
|
|
||||||
stack_sig: white,
|
|
||||||
description: yellow,
|
|
||||||
example: gold,
|
|
||||||
category_focused: white,
|
|
||||||
category_selected: yellow,
|
|
||||||
category_normal: light_yellow,
|
|
||||||
category_dimmed: dim_yellow,
|
|
||||||
border_focused: white,
|
|
||||||
border_normal: dim_yellow,
|
|
||||||
header_desc: gold,
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: yellow,
|
|
||||||
author: white,
|
|
||||||
link: gold,
|
|
||||||
license: light_yellow,
|
|
||||||
prompt: gold,
|
|
||||||
subtitle: yellow,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: yellow,
|
|
||||||
mid: gold,
|
|
||||||
high: white,
|
|
||||||
low_rgb: (255, 255, 0),
|
|
||||||
mid_rgb: (255, 215, 0),
|
|
||||||
high_rgb: (255, 255, 255),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(255, 255, 0),
|
|
||||||
(255, 255, 255),
|
|
||||||
(255, 215, 0),
|
|
||||||
(255, 255, 95),
|
|
||||||
(255, 255, 0),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: white,
|
|
||||||
button_selected_bg: yellow,
|
|
||||||
button_selected_fg: red,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,283 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(31, 31, 40);
|
Palette {
|
||||||
let bg_light = Color::Rgb(43, 43, 54);
|
bg: (31, 31, 40),
|
||||||
let bg_lighter = Color::Rgb(54, 54, 70);
|
surface: (43, 43, 54),
|
||||||
let fg = Color::Rgb(220, 215, 186);
|
surface2: (54, 54, 70),
|
||||||
let fg_dim = Color::Rgb(160, 158, 140);
|
fg: (220, 215, 186),
|
||||||
let comment = Color::Rgb(114, 113, 105);
|
fg_dim: (160, 158, 140),
|
||||||
let crystal_blue = Color::Rgb(126, 156, 216);
|
fg_muted: (114, 113, 105),
|
||||||
let oni_violet = Color::Rgb(149, 127, 184);
|
accent: (210, 126, 153), // sakura_pink
|
||||||
let autumn_green = Color::Rgb(118, 148, 106);
|
red: (195, 64, 67),
|
||||||
let autumn_red = Color::Rgb(195, 64, 67);
|
green: (118, 148, 106),
|
||||||
let carp_yellow = Color::Rgb(230, 195, 132);
|
yellow: (230, 195, 132), // carp_yellow
|
||||||
let spring_blue = Color::Rgb(127, 180, 202);
|
blue: (126, 156, 216), // crystal_blue
|
||||||
let wave_red = Color::Rgb(228, 104, 118);
|
purple: (149, 127, 184), // oni_violet
|
||||||
let sakura_pink = Color::Rgb(210, 126, 153);
|
cyan: (127, 180, 202), // spring_blue
|
||||||
|
orange: (230, 195, 132), // carp_yellow
|
||||||
let darker_bg = Color::Rgb(26, 26, 34);
|
tempo_color: (149, 127, 184),
|
||||||
|
bank_color: (126, 156, 216),
|
||||||
ThemeColors {
|
pattern_color: (118, 148, 106),
|
||||||
ui: UiColors {
|
title_accent: (210, 126, 153),
|
||||||
bg,
|
title_author: (126, 156, 216),
|
||||||
bg_rgb: (31, 31, 40),
|
secondary: (210, 126, 153),
|
||||||
text_primary: fg,
|
link_bright: [
|
||||||
text_muted: fg_dim,
|
(228, 104, 118), (149, 127, 184), (230, 195, 132),
|
||||||
text_dim: comment,
|
(127, 180, 202), (118, 148, 106),
|
||||||
border: bg_lighter,
|
],
|
||||||
header: crystal_blue,
|
link_dim: [
|
||||||
unfocused: comment,
|
(75, 45, 50), (55, 50, 70), (70, 60, 50),
|
||||||
accent: sakura_pink,
|
(45, 60, 70), (45, 55, 45),
|
||||||
surface: bg_light,
|
],
|
||||||
},
|
sparkle: [
|
||||||
status: StatusColors {
|
(127, 180, 202), (230, 195, 132), (118, 148, 106),
|
||||||
playing_bg: Color::Rgb(40, 55, 45),
|
(228, 104, 118), (149, 127, 184),
|
||||||
playing_fg: autumn_green,
|
],
|
||||||
stopped_bg: Color::Rgb(60, 40, 45),
|
meter: [(118, 148, 106), (230, 195, 132), (228, 104, 118)],
|
||||||
stopped_fg: autumn_red,
|
|
||||||
fill_on: autumn_green,
|
|
||||||
fill_off: comment,
|
|
||||||
fill_bg: bg_light,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: sakura_pink,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selected_bg: Color::Rgb(65, 55, 70),
|
|
||||||
selected_fg: sakura_pink,
|
|
||||||
in_range_bg: Color::Rgb(50, 50, 60),
|
|
||||||
in_range_fg: fg,
|
|
||||||
cursor: sakura_pink,
|
|
||||||
selected: Color::Rgb(65, 55, 70),
|
|
||||||
in_range: Color::Rgb(50, 50, 60),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(65, 60, 50),
|
|
||||||
playing_active_fg: carp_yellow,
|
|
||||||
playing_inactive_bg: Color::Rgb(55, 55, 50),
|
|
||||||
playing_inactive_fg: fg_dim,
|
|
||||||
active_bg: Color::Rgb(45, 55, 70),
|
|
||||||
active_fg: crystal_blue,
|
|
||||||
content_bg: Color::Rgb(52, 62, 77),
|
|
||||||
inactive_bg: bg_light,
|
|
||||||
inactive_fg: fg_dim,
|
|
||||||
active_selected_bg: Color::Rgb(65, 55, 70),
|
|
||||||
active_in_range_bg: Color::Rgb(50, 50, 60),
|
|
||||||
link_bright: [
|
|
||||||
(228, 104, 118),
|
|
||||||
(149, 127, 184),
|
|
||||||
(230, 195, 132),
|
|
||||||
(127, 180, 202),
|
|
||||||
(118, 148, 106),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(75, 45, 50),
|
|
||||||
(55, 50, 70),
|
|
||||||
(70, 60, 50),
|
|
||||||
(45, 60, 70),
|
|
||||||
(45, 55, 45),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(55, 50, 65),
|
|
||||||
tempo_fg: oni_violet,
|
|
||||||
bank_bg: Color::Rgb(45, 55, 70),
|
|
||||||
bank_fg: crystal_blue,
|
|
||||||
pattern_bg: Color::Rgb(45, 55, 45),
|
|
||||||
pattern_fg: autumn_green,
|
|
||||||
stats_bg: bg_light,
|
|
||||||
stats_fg: fg_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: crystal_blue,
|
|
||||||
border_accent: sakura_pink,
|
|
||||||
border_warn: carp_yellow,
|
|
||||||
border_dim: comment,
|
|
||||||
confirm: carp_yellow,
|
|
||||||
rename: oni_violet,
|
|
||||||
input: crystal_blue,
|
|
||||||
editor: crystal_blue,
|
|
||||||
preview: comment,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(60, 40, 45),
|
|
||||||
error_fg: wave_red,
|
|
||||||
success_bg: Color::Rgb(40, 55, 45),
|
|
||||||
success_fg: autumn_green,
|
|
||||||
info_bg: bg_light,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(40, 55, 45),
|
|
||||||
playing_fg: autumn_green,
|
|
||||||
staged_play_bg: Color::Rgb(55, 50, 70),
|
|
||||||
staged_play_fg: oni_violet,
|
|
||||||
staged_stop_bg: Color::Rgb(65, 45, 50),
|
|
||||||
staged_stop_fg: wave_red,
|
|
||||||
edit_bg: Color::Rgb(45, 55, 70),
|
|
||||||
edit_fg: crystal_blue,
|
|
||||||
hover_bg: bg_lighter,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(38, 38, 48),
|
|
||||||
muted_fg: comment,
|
|
||||||
soloed_bg: Color::Rgb(60, 55, 45),
|
|
||||||
soloed_fg: carp_yellow,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: autumn_red,
|
|
||||||
connected: autumn_green,
|
|
||||||
listening: carp_yellow,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: darker_bg,
|
|
||||||
executed_bg: Color::Rgb(45, 45, 55),
|
|
||||||
selected_bg: Color::Rgb(65, 60, 50),
|
|
||||||
emit: (fg, Color::Rgb(60, 50, 60)),
|
|
||||||
number: (oni_violet, Color::Rgb(55, 50, 65)),
|
|
||||||
string: (autumn_green, Color::Rgb(45, 55, 45)),
|
|
||||||
comment: (comment, darker_bg),
|
|
||||||
keyword: (sakura_pink, Color::Rgb(60, 50, 55)),
|
|
||||||
stack_op: (spring_blue, Color::Rgb(45, 55, 65)),
|
|
||||||
operator: (wave_red, Color::Rgb(60, 45, 50)),
|
|
||||||
sound: (crystal_blue, Color::Rgb(45, 55, 70)),
|
|
||||||
param: (carp_yellow, Color::Rgb(65, 60, 50)),
|
|
||||||
context: (carp_yellow, Color::Rgb(65, 60, 50)),
|
|
||||||
note: (autumn_green, Color::Rgb(45, 55, 45)),
|
|
||||||
interval: (Color::Rgb(150, 180, 130), Color::Rgb(45, 55, 45)),
|
|
||||||
variable: (autumn_green, Color::Rgb(45, 55, 45)),
|
|
||||||
vary: (carp_yellow, Color::Rgb(65, 60, 50)),
|
|
||||||
generator: (spring_blue, Color::Rgb(45, 55, 65)),
|
|
||||||
user_defined: (sakura_pink, Color::Rgb(55, 40, 50)),
|
|
||||||
default: (fg_dim, darker_bg),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: darker_bg,
|
|
||||||
row_odd: bg,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: carp_yellow,
|
|
||||||
value: fg_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: carp_yellow,
|
|
||||||
text: comment,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(60, 50, 70),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: bg_light,
|
|
||||||
unselected_fg: comment,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(55, 55, 70),
|
|
||||||
completion_bg: bg_light,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: carp_yellow,
|
|
||||||
completion_example: spring_blue,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: crystal_blue,
|
|
||||||
project_file: oni_violet,
|
|
||||||
selected: carp_yellow,
|
|
||||||
file: fg,
|
|
||||||
focused_border: carp_yellow,
|
|
||||||
unfocused_border: comment,
|
|
||||||
root: fg,
|
|
||||||
file_icon: comment,
|
|
||||||
folder_icon: crystal_blue,
|
|
||||||
empty_text: comment,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: crystal_blue,
|
|
||||||
cursor: fg,
|
|
||||||
hint: comment,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: carp_yellow,
|
|
||||||
inactive: comment,
|
|
||||||
match_bg: carp_yellow,
|
|
||||||
match_fg: bg,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: crystal_blue,
|
|
||||||
h2: carp_yellow,
|
|
||||||
h3: oni_violet,
|
|
||||||
code: autumn_green,
|
|
||||||
code_border: Color::Rgb(65, 65, 80),
|
|
||||||
link: sakura_pink,
|
|
||||||
link_url: Color::Rgb(100, 100, 115),
|
|
||||||
quote: comment,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: crystal_blue,
|
|
||||||
header_focused: carp_yellow,
|
|
||||||
divider: Color::Rgb(60, 60, 75),
|
|
||||||
scroll_indicator: Color::Rgb(75, 75, 92),
|
|
||||||
label: Color::Rgb(140, 138, 125),
|
|
||||||
label_focused: Color::Rgb(170, 168, 155),
|
|
||||||
label_dim: Color::Rgb(110, 108, 100),
|
|
||||||
value: Color::Rgb(200, 195, 175),
|
|
||||||
focused: carp_yellow,
|
|
||||||
normal: fg,
|
|
||||||
dim: Color::Rgb(75, 75, 92),
|
|
||||||
path: Color::Rgb(140, 138, 125),
|
|
||||||
border_magenta: oni_violet,
|
|
||||||
border_green: autumn_green,
|
|
||||||
border_cyan: spring_blue,
|
|
||||||
separator: Color::Rgb(60, 60, 75),
|
|
||||||
hint_active: Color::Rgb(220, 185, 120),
|
|
||||||
hint_inactive: Color::Rgb(60, 60, 75),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: autumn_green,
|
|
||||||
word_bg: Color::Rgb(45, 50, 50),
|
|
||||||
alias: comment,
|
|
||||||
stack_sig: oni_violet,
|
|
||||||
description: fg,
|
|
||||||
example: Color::Rgb(140, 138, 125),
|
|
||||||
category_focused: carp_yellow,
|
|
||||||
category_selected: crystal_blue,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: Color::Rgb(75, 75, 92),
|
|
||||||
border_focused: carp_yellow,
|
|
||||||
border_normal: Color::Rgb(60, 60, 75),
|
|
||||||
header_desc: Color::Rgb(160, 158, 145),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: sakura_pink,
|
|
||||||
author: crystal_blue,
|
|
||||||
link: autumn_green,
|
|
||||||
license: carp_yellow,
|
|
||||||
prompt: Color::Rgb(160, 158, 145),
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: autumn_green,
|
|
||||||
mid: carp_yellow,
|
|
||||||
high: wave_red,
|
|
||||||
low_rgb: (118, 148, 106),
|
|
||||||
mid_rgb: (230, 195, 132),
|
|
||||||
high_rgb: (228, 104, 118),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(127, 180, 202),
|
|
||||||
(230, 195, 132),
|
|
||||||
(118, 148, 106),
|
|
||||||
(228, 104, 118),
|
|
||||||
(149, 127, 184),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: carp_yellow,
|
|
||||||
button_selected_bg: carp_yellow,
|
|
||||||
button_selected_fg: bg,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,283 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(255, 255, 255);
|
Palette {
|
||||||
let off_white = Color::Rgb(245, 245, 247);
|
bg: (255, 255, 255),
|
||||||
let surface = Color::Rgb(235, 235, 240);
|
surface: (235, 235, 240),
|
||||||
let border = Color::Rgb(210, 210, 215);
|
surface2: (210, 210, 215),
|
||||||
let text = Color::Rgb(29, 29, 31);
|
fg: (29, 29, 31),
|
||||||
let text_dim = Color::Rgb(110, 110, 115);
|
fg_dim: (110, 110, 115),
|
||||||
let text_muted = Color::Rgb(160, 160, 165);
|
fg_muted: (160, 160, 165),
|
||||||
|
accent: (0, 112, 243),
|
||||||
let keyword = Color::Rgb(173, 61, 164);
|
red: (209, 47, 27),
|
||||||
let string = Color::Rgb(209, 47, 27);
|
green: (112, 127, 52),
|
||||||
let comment = Color::Rgb(112, 127, 52);
|
yellow: (200, 150, 20),
|
||||||
let number = Color::Rgb(39, 42, 216);
|
blue: (0, 112, 243),
|
||||||
let types = Color::Rgb(112, 61, 170);
|
purple: (173, 61, 164), // keyword
|
||||||
let function = Color::Rgb(62, 128, 135);
|
cyan: (62, 128, 135), // function
|
||||||
let preproc = Color::Rgb(120, 73, 42);
|
orange: (120, 73, 42), // preproc
|
||||||
let accent = Color::Rgb(0, 112, 243);
|
tempo_color: (112, 61, 170),
|
||||||
|
bank_color: (0, 112, 243),
|
||||||
ThemeColors {
|
pattern_color: (62, 128, 135),
|
||||||
ui: UiColors {
|
title_accent: (0, 112, 243),
|
||||||
bg,
|
title_author: (112, 61, 170),
|
||||||
bg_rgb: (255, 255, 255),
|
secondary: (120, 73, 42),
|
||||||
text_primary: text,
|
link_bright: [
|
||||||
text_muted: text_dim,
|
(173, 61, 164), (0, 112, 243), (120, 73, 42),
|
||||||
text_dim: text_muted,
|
(62, 128, 135), (112, 127, 52),
|
||||||
border,
|
],
|
||||||
header: accent,
|
link_dim: [
|
||||||
unfocused: text_muted,
|
(235, 215, 235), (210, 225, 250), (240, 225, 210),
|
||||||
accent,
|
(215, 235, 240), (225, 235, 215),
|
||||||
surface,
|
],
|
||||||
},
|
sparkle: [
|
||||||
status: StatusColors {
|
(0, 112, 243), (173, 61, 164), (112, 127, 52),
|
||||||
playing_bg: Color::Rgb(220, 240, 220),
|
(62, 128, 135), (120, 73, 42),
|
||||||
playing_fg: comment,
|
],
|
||||||
stopped_bg: Color::Rgb(245, 220, 220),
|
meter: [(112, 127, 52), (200, 150, 20), (209, 47, 27)],
|
||||||
stopped_fg: string,
|
|
||||||
fill_on: comment,
|
|
||||||
fill_off: text_muted,
|
|
||||||
fill_bg: surface,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: accent,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selected_bg: Color::Rgb(200, 220, 250),
|
|
||||||
selected_fg: accent,
|
|
||||||
in_range_bg: Color::Rgb(220, 233, 250),
|
|
||||||
in_range_fg: text,
|
|
||||||
cursor: accent,
|
|
||||||
selected: Color::Rgb(200, 220, 250),
|
|
||||||
in_range: Color::Rgb(220, 233, 250),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(250, 225, 210),
|
|
||||||
playing_active_fg: preproc,
|
|
||||||
playing_inactive_bg: Color::Rgb(250, 240, 200),
|
|
||||||
playing_inactive_fg: Color::Rgb(180, 140, 20),
|
|
||||||
active_bg: Color::Rgb(210, 235, 240),
|
|
||||||
active_fg: function,
|
|
||||||
content_bg: Color::Rgb(195, 225, 230),
|
|
||||||
inactive_bg: surface,
|
|
||||||
inactive_fg: text_dim,
|
|
||||||
active_selected_bg: Color::Rgb(210, 215, 245),
|
|
||||||
active_in_range_bg: Color::Rgb(220, 230, 245),
|
|
||||||
link_bright: [
|
|
||||||
(173, 61, 164),
|
|
||||||
(0, 112, 243),
|
|
||||||
(120, 73, 42),
|
|
||||||
(62, 128, 135),
|
|
||||||
(112, 127, 52),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(235, 215, 235),
|
|
||||||
(210, 225, 250),
|
|
||||||
(240, 225, 210),
|
|
||||||
(215, 235, 240),
|
|
||||||
(225, 235, 215),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(225, 215, 240),
|
|
||||||
tempo_fg: types,
|
|
||||||
bank_bg: Color::Rgb(210, 230, 250),
|
|
||||||
bank_fg: accent,
|
|
||||||
pattern_bg: Color::Rgb(210, 235, 235),
|
|
||||||
pattern_fg: function,
|
|
||||||
stats_bg: surface,
|
|
||||||
stats_fg: text_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: accent,
|
|
||||||
border_accent: keyword,
|
|
||||||
border_warn: preproc,
|
|
||||||
border_dim: text_muted,
|
|
||||||
confirm: preproc,
|
|
||||||
rename: keyword,
|
|
||||||
input: accent,
|
|
||||||
editor: accent,
|
|
||||||
preview: text_muted,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(250, 215, 215),
|
|
||||||
error_fg: string,
|
|
||||||
success_bg: Color::Rgb(215, 240, 215),
|
|
||||||
success_fg: comment,
|
|
||||||
info_bg: surface,
|
|
||||||
info_fg: text,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(215, 240, 220),
|
|
||||||
playing_fg: comment,
|
|
||||||
staged_play_bg: Color::Rgb(230, 215, 240),
|
|
||||||
staged_play_fg: keyword,
|
|
||||||
staged_stop_bg: Color::Rgb(245, 215, 220),
|
|
||||||
staged_stop_fg: string,
|
|
||||||
edit_bg: Color::Rgb(210, 235, 240),
|
|
||||||
edit_fg: function,
|
|
||||||
hover_bg: Color::Rgb(240, 240, 242),
|
|
||||||
hover_fg: text,
|
|
||||||
muted_bg: Color::Rgb(230, 230, 235),
|
|
||||||
muted_fg: text_muted,
|
|
||||||
soloed_bg: Color::Rgb(250, 240, 200),
|
|
||||||
soloed_fg: Color::Rgb(170, 130, 10),
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: string,
|
|
||||||
connected: comment,
|
|
||||||
listening: Color::Rgb(180, 140, 20),
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: off_white,
|
|
||||||
executed_bg: Color::Rgb(230, 225, 245),
|
|
||||||
selected_bg: Color::Rgb(250, 240, 210),
|
|
||||||
emit: (text, Color::Rgb(250, 220, 215)),
|
|
||||||
number: (number, Color::Rgb(220, 220, 250)),
|
|
||||||
string: (string, Color::Rgb(250, 225, 220)),
|
|
||||||
comment: (Color::Rgb(130, 145, 75), off_white),
|
|
||||||
keyword: (keyword, Color::Rgb(240, 225, 240)),
|
|
||||||
stack_op: (accent, Color::Rgb(220, 235, 250)),
|
|
||||||
operator: (preproc, Color::Rgb(240, 230, 215)),
|
|
||||||
sound: (function, Color::Rgb(215, 240, 240)),
|
|
||||||
param: (types, Color::Rgb(230, 220, 240)),
|
|
||||||
context: (preproc, Color::Rgb(240, 230, 215)),
|
|
||||||
note: (comment, Color::Rgb(225, 240, 220)),
|
|
||||||
interval: (Color::Rgb(90, 110, 40), Color::Rgb(225, 240, 215)),
|
|
||||||
variable: (keyword, Color::Rgb(240, 225, 240)),
|
|
||||||
vary: (Color::Rgb(180, 140, 20), Color::Rgb(250, 240, 210)),
|
|
||||||
generator: (function, Color::Rgb(215, 240, 235)),
|
|
||||||
user_defined: (preproc, Color::Rgb(240, 230, 215)),
|
|
||||||
default: (text_dim, off_white),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: off_white,
|
|
||||||
row_odd: bg,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: preproc,
|
|
||||||
value: text_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: accent,
|
|
||||||
text: text_muted,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: text, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(210, 225, 250),
|
|
||||||
selected_fg: text,
|
|
||||||
unselected_bg: surface,
|
|
||||||
unselected_fg: text_muted,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: text,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(200, 220, 250),
|
|
||||||
completion_bg: surface,
|
|
||||||
completion_fg: text,
|
|
||||||
completion_selected: accent,
|
|
||||||
completion_example: function,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: accent,
|
|
||||||
project_file: keyword,
|
|
||||||
selected: preproc,
|
|
||||||
file: text,
|
|
||||||
focused_border: accent,
|
|
||||||
unfocused_border: text_muted,
|
|
||||||
root: text,
|
|
||||||
file_icon: text_muted,
|
|
||||||
folder_icon: accent,
|
|
||||||
empty_text: text_muted,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: accent,
|
|
||||||
cursor: text,
|
|
||||||
hint: text_muted,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: accent,
|
|
||||||
inactive: text_muted,
|
|
||||||
match_bg: Color::Rgb(255, 230, 80),
|
|
||||||
match_fg: text,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: accent,
|
|
||||||
h2: preproc,
|
|
||||||
h3: keyword,
|
|
||||||
code: comment,
|
|
||||||
code_border: Color::Rgb(200, 200, 205),
|
|
||||||
link: function,
|
|
||||||
link_url: Color::Rgb(150, 150, 155),
|
|
||||||
quote: text_muted,
|
|
||||||
text,
|
|
||||||
list: text,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: accent,
|
|
||||||
header_focused: preproc,
|
|
||||||
divider: Color::Rgb(200, 200, 205),
|
|
||||||
scroll_indicator: Color::Rgb(180, 180, 185),
|
|
||||||
label: Color::Rgb(120, 120, 125),
|
|
||||||
label_focused: Color::Rgb(80, 80, 85),
|
|
||||||
label_dim: Color::Rgb(150, 150, 155),
|
|
||||||
value: Color::Rgb(60, 60, 65),
|
|
||||||
focused: preproc,
|
|
||||||
normal: text,
|
|
||||||
dim: Color::Rgb(180, 180, 185),
|
|
||||||
path: Color::Rgb(120, 120, 125),
|
|
||||||
border_magenta: keyword,
|
|
||||||
border_green: comment,
|
|
||||||
border_cyan: function,
|
|
||||||
separator: Color::Rgb(200, 200, 210),
|
|
||||||
hint_active: preproc,
|
|
||||||
hint_inactive: Color::Rgb(200, 200, 210),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: function,
|
|
||||||
word_bg: Color::Rgb(215, 235, 240),
|
|
||||||
alias: text_muted,
|
|
||||||
stack_sig: keyword,
|
|
||||||
description: text,
|
|
||||||
example: Color::Rgb(110, 110, 120),
|
|
||||||
category_focused: preproc,
|
|
||||||
category_selected: accent,
|
|
||||||
category_normal: text,
|
|
||||||
category_dimmed: Color::Rgb(180, 180, 185),
|
|
||||||
border_focused: preproc,
|
|
||||||
border_normal: Color::Rgb(200, 200, 205),
|
|
||||||
header_desc: Color::Rgb(100, 100, 110),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: accent,
|
|
||||||
author: types,
|
|
||||||
link: function,
|
|
||||||
license: preproc,
|
|
||||||
prompt: Color::Rgb(100, 100, 110),
|
|
||||||
subtitle: text,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: comment,
|
|
||||||
mid: Color::Rgb(200, 150, 20),
|
|
||||||
high: string,
|
|
||||||
low_rgb: (112, 127, 52),
|
|
||||||
mid_rgb: (200, 150, 20),
|
|
||||||
high_rgb: (209, 47, 27),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(0, 112, 243),
|
|
||||||
(173, 61, 164),
|
|
||||||
(112, 127, 52),
|
|
||||||
(62, 128, 135),
|
|
||||||
(120, 73, 42),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: accent,
|
|
||||||
button_selected_bg: accent,
|
|
||||||
button_selected_fg: bg,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
//! Centralized color definitions for Cagire TUI.
|
//! Centralized color definitions for Cagire TUI.
|
||||||
//! Supports multiple color schemes with runtime switching.
|
//! Supports multiple color schemes with runtime switching.
|
||||||
|
|
||||||
|
pub mod palette;
|
||||||
|
pub mod build;
|
||||||
mod catppuccin_latte;
|
mod catppuccin_latte;
|
||||||
mod catppuccin_mocha;
|
mod catppuccin_mocha;
|
||||||
mod dracula;
|
mod dracula;
|
||||||
@@ -27,32 +29,32 @@ use std::cell::RefCell;
|
|||||||
pub struct ThemeEntry {
|
pub struct ThemeEntry {
|
||||||
pub id: &'static str,
|
pub id: &'static str,
|
||||||
pub label: &'static str,
|
pub label: &'static str,
|
||||||
pub colors: fn() -> ThemeColors,
|
pub palette: fn() -> palette::Palette,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const THEMES: &[ThemeEntry] = &[
|
pub const THEMES: &[ThemeEntry] = &[
|
||||||
ThemeEntry { id: "CatppuccinMocha", label: "Catppuccin Mocha", colors: catppuccin_mocha::theme },
|
ThemeEntry { id: "CatppuccinMocha", label: "Catppuccin Mocha", palette: catppuccin_mocha::palette },
|
||||||
ThemeEntry { id: "CatppuccinLatte", label: "Catppuccin Latte", colors: catppuccin_latte::theme },
|
ThemeEntry { id: "CatppuccinLatte", label: "Catppuccin Latte", palette: catppuccin_latte::palette },
|
||||||
ThemeEntry { id: "Nord", label: "Nord", colors: nord::theme },
|
ThemeEntry { id: "Nord", label: "Nord", palette: nord::palette },
|
||||||
ThemeEntry { id: "Dracula", label: "Dracula", colors: dracula::theme },
|
ThemeEntry { id: "Dracula", label: "Dracula", palette: dracula::palette },
|
||||||
ThemeEntry { id: "GruvboxDark", label: "Gruvbox Dark", colors: gruvbox_dark::theme },
|
ThemeEntry { id: "GruvboxDark", label: "Gruvbox Dark", palette: gruvbox_dark::palette },
|
||||||
ThemeEntry { id: "Monokai", label: "Monokai", colors: monokai::theme },
|
ThemeEntry { id: "Monokai", label: "Monokai", palette: monokai::palette },
|
||||||
ThemeEntry { id: "MonochromeBlack", label: "Monochrome (Black)", colors: monochrome_black::theme },
|
ThemeEntry { id: "MonochromeBlack", label: "Monochrome (Black)", palette: monochrome_black::palette },
|
||||||
ThemeEntry { id: "MonochromeWhite", label: "Monochrome (White)", colors: monochrome_white::theme },
|
ThemeEntry { id: "MonochromeWhite", label: "Monochrome (White)", palette: monochrome_white::palette },
|
||||||
ThemeEntry { id: "PitchBlack", label: "Pitch Black", colors: pitch_black::theme },
|
ThemeEntry { id: "PitchBlack", label: "Pitch Black", palette: pitch_black::palette },
|
||||||
ThemeEntry { id: "TokyoNight", label: "Tokyo Night", colors: tokyo_night::theme },
|
ThemeEntry { id: "TokyoNight", label: "Tokyo Night", palette: tokyo_night::palette },
|
||||||
ThemeEntry { id: "RosePine", label: "Rosé Pine", colors: rose_pine::theme },
|
ThemeEntry { id: "RosePine", label: "Rosé Pine", palette: rose_pine::palette },
|
||||||
ThemeEntry { id: "Kanagawa", label: "Kanagawa", colors: kanagawa::theme },
|
ThemeEntry { id: "Kanagawa", label: "Kanagawa", palette: kanagawa::palette },
|
||||||
ThemeEntry { id: "Fairyfloss", label: "Fairyfloss", colors: fairyfloss::theme },
|
ThemeEntry { id: "Fairyfloss", label: "Fairyfloss", palette: fairyfloss::palette },
|
||||||
ThemeEntry { id: "HotDogStand", label: "Hot Dog Stand", colors: hot_dog_stand::theme },
|
ThemeEntry { id: "HotDogStand", label: "Hot Dog Stand", palette: hot_dog_stand::palette },
|
||||||
ThemeEntry { id: "LetzLight", label: "Letz Light", colors: letz_light::theme },
|
ThemeEntry { id: "LetzLight", label: "Letz Light", palette: letz_light::palette },
|
||||||
ThemeEntry { id: "Ember", label: "Ember", colors: ember::theme },
|
ThemeEntry { id: "Ember", label: "Ember", palette: ember::palette },
|
||||||
ThemeEntry { id: "Eden", label: "Eden", colors: eden::theme },
|
ThemeEntry { id: "Eden", label: "Eden", palette: eden::palette },
|
||||||
ThemeEntry { id: "Georges", label: "Georges", colors: georges::theme },
|
ThemeEntry { id: "Georges", label: "Georges", palette: georges::palette },
|
||||||
];
|
];
|
||||||
|
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static CURRENT_THEME: RefCell<ThemeColors> = RefCell::new((THEMES[0].colors)());
|
static CURRENT_THEME: RefCell<ThemeColors> = RefCell::new(build::build(&(THEMES[0].palette)()));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get() -> ThemeColors {
|
pub fn get() -> ThemeColors {
|
||||||
|
|||||||
@@ -1,280 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(0, 0, 0);
|
Palette {
|
||||||
let surface = Color::Rgb(18, 18, 18);
|
bg: (0, 0, 0),
|
||||||
let surface2 = Color::Rgb(30, 30, 30);
|
surface: (18, 18, 18),
|
||||||
let border = Color::Rgb(60, 60, 60);
|
surface2: (30, 30, 30),
|
||||||
let fg = Color::Rgb(255, 255, 255);
|
fg: (255, 255, 255),
|
||||||
let fg_dim = Color::Rgb(180, 180, 180);
|
fg_dim: (180, 180, 180),
|
||||||
let fg_muted = Color::Rgb(120, 120, 120);
|
fg_muted: (120, 120, 120),
|
||||||
|
accent: (255, 255, 255),
|
||||||
let bright = Color::Rgb(255, 255, 255);
|
red: (180, 180, 180),
|
||||||
let medium = Color::Rgb(180, 180, 180);
|
green: (255, 255, 255),
|
||||||
let dim = Color::Rgb(120, 120, 120);
|
yellow: (180, 180, 180),
|
||||||
let dark = Color::Rgb(80, 80, 80);
|
blue: (180, 180, 180),
|
||||||
let darker = Color::Rgb(50, 50, 50);
|
purple: (180, 180, 180),
|
||||||
|
cyan: (255, 255, 255),
|
||||||
ThemeColors {
|
orange: (255, 255, 255),
|
||||||
ui: UiColors {
|
tempo_color: (255, 255, 255),
|
||||||
bg,
|
bank_color: (180, 180, 180),
|
||||||
bg_rgb: (0, 0, 0),
|
pattern_color: (180, 180, 180),
|
||||||
text_primary: fg,
|
title_accent: (255, 255, 255),
|
||||||
text_muted: fg_dim,
|
title_author: (180, 180, 180),
|
||||||
text_dim: fg_muted,
|
secondary: (120, 120, 120),
|
||||||
border,
|
link_bright: [
|
||||||
header: bright,
|
(255, 255, 255), (200, 200, 200), (160, 160, 160),
|
||||||
unfocused: fg_muted,
|
(220, 220, 220), (180, 180, 180),
|
||||||
accent: bright,
|
],
|
||||||
surface,
|
link_dim: [
|
||||||
},
|
(60, 60, 60), (50, 50, 50), (45, 45, 45),
|
||||||
status: StatusColors {
|
(55, 55, 55), (48, 48, 48),
|
||||||
playing_bg: Color::Rgb(40, 40, 40),
|
],
|
||||||
playing_fg: bright,
|
sparkle: [
|
||||||
stopped_bg: Color::Rgb(25, 25, 25),
|
(255, 255, 255), (200, 200, 200), (160, 160, 160),
|
||||||
stopped_fg: medium,
|
(220, 220, 220), (180, 180, 180),
|
||||||
fill_on: bright,
|
],
|
||||||
fill_off: dark,
|
meter: [(120, 120, 120), (180, 180, 180), (255, 255, 255)],
|
||||||
fill_bg: surface,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: bright,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selected_bg: Color::Rgb(60, 60, 60),
|
|
||||||
selected_fg: bright,
|
|
||||||
in_range_bg: Color::Rgb(40, 40, 40),
|
|
||||||
in_range_fg: fg,
|
|
||||||
cursor: bright,
|
|
||||||
selected: Color::Rgb(60, 60, 60),
|
|
||||||
in_range: Color::Rgb(40, 40, 40),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(70, 70, 70),
|
|
||||||
playing_active_fg: bright,
|
|
||||||
playing_inactive_bg: Color::Rgb(50, 50, 50),
|
|
||||||
playing_inactive_fg: medium,
|
|
||||||
active_bg: Color::Rgb(45, 45, 45),
|
|
||||||
active_fg: bright,
|
|
||||||
content_bg: Color::Rgb(55, 55, 55),
|
|
||||||
inactive_bg: surface,
|
|
||||||
inactive_fg: fg_dim,
|
|
||||||
active_selected_bg: Color::Rgb(80, 80, 80),
|
|
||||||
active_in_range_bg: Color::Rgb(55, 55, 55),
|
|
||||||
link_bright: [
|
|
||||||
(255, 255, 255),
|
|
||||||
(200, 200, 200),
|
|
||||||
(160, 160, 160),
|
|
||||||
(220, 220, 220),
|
|
||||||
(180, 180, 180),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(60, 60, 60),
|
|
||||||
(50, 50, 50),
|
|
||||||
(45, 45, 45),
|
|
||||||
(55, 55, 55),
|
|
||||||
(48, 48, 48),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(50, 50, 50),
|
|
||||||
tempo_fg: bright,
|
|
||||||
bank_bg: Color::Rgb(40, 40, 40),
|
|
||||||
bank_fg: medium,
|
|
||||||
pattern_bg: Color::Rgb(35, 35, 35),
|
|
||||||
pattern_fg: medium,
|
|
||||||
stats_bg: surface,
|
|
||||||
stats_fg: fg_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: bright,
|
|
||||||
border_accent: medium,
|
|
||||||
border_warn: fg_dim,
|
|
||||||
border_dim: fg_muted,
|
|
||||||
confirm: medium,
|
|
||||||
rename: medium,
|
|
||||||
input: bright,
|
|
||||||
editor: bright,
|
|
||||||
preview: fg_muted,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(60, 60, 60),
|
|
||||||
error_fg: bright,
|
|
||||||
success_bg: Color::Rgb(50, 50, 50),
|
|
||||||
success_fg: bright,
|
|
||||||
info_bg: surface,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(50, 50, 50),
|
|
||||||
playing_fg: bright,
|
|
||||||
staged_play_bg: Color::Rgb(45, 45, 45),
|
|
||||||
staged_play_fg: medium,
|
|
||||||
staged_stop_bg: Color::Rgb(35, 35, 35),
|
|
||||||
staged_stop_fg: dim,
|
|
||||||
edit_bg: Color::Rgb(40, 40, 40),
|
|
||||||
edit_fg: bright,
|
|
||||||
hover_bg: surface2,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(22, 22, 22),
|
|
||||||
muted_fg: dark,
|
|
||||||
soloed_bg: Color::Rgb(60, 60, 60),
|
|
||||||
soloed_fg: bright,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: dim,
|
|
||||||
connected: bright,
|
|
||||||
listening: medium,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: bg,
|
|
||||||
executed_bg: Color::Rgb(35, 35, 35),
|
|
||||||
selected_bg: Color::Rgb(55, 55, 55),
|
|
||||||
emit: (bright, Color::Rgb(45, 45, 45)),
|
|
||||||
number: (medium, Color::Rgb(35, 35, 35)),
|
|
||||||
string: (bright, Color::Rgb(40, 40, 40)),
|
|
||||||
comment: (dark, bg),
|
|
||||||
keyword: (bright, Color::Rgb(50, 50, 50)),
|
|
||||||
stack_op: (medium, Color::Rgb(30, 30, 30)),
|
|
||||||
operator: (medium, Color::Rgb(35, 35, 35)),
|
|
||||||
sound: (bright, Color::Rgb(45, 45, 45)),
|
|
||||||
param: (medium, Color::Rgb(35, 35, 35)),
|
|
||||||
context: (medium, Color::Rgb(30, 30, 30)),
|
|
||||||
note: (bright, Color::Rgb(40, 40, 40)),
|
|
||||||
interval: (medium, Color::Rgb(35, 35, 35)),
|
|
||||||
variable: (medium, Color::Rgb(30, 30, 30)),
|
|
||||||
vary: (dim, Color::Rgb(25, 25, 25)),
|
|
||||||
generator: (bright, Color::Rgb(45, 45, 45)),
|
|
||||||
user_defined: (medium, Color::Rgb(35, 35, 35)),
|
|
||||||
default: (fg_dim, bg),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: bg,
|
|
||||||
row_odd: surface,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: bright,
|
|
||||||
value: fg_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: bright,
|
|
||||||
text: fg_muted,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(60, 60, 60),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: surface,
|
|
||||||
unselected_fg: fg_muted,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(60, 60, 60),
|
|
||||||
completion_bg: surface,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: bright,
|
|
||||||
completion_example: medium,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: medium,
|
|
||||||
project_file: bright,
|
|
||||||
selected: bright,
|
|
||||||
file: fg,
|
|
||||||
focused_border: bright,
|
|
||||||
unfocused_border: fg_muted,
|
|
||||||
root: fg,
|
|
||||||
file_icon: fg_muted,
|
|
||||||
folder_icon: medium,
|
|
||||||
empty_text: fg_muted,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: bright,
|
|
||||||
cursor: fg,
|
|
||||||
hint: fg_muted,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: bright,
|
|
||||||
inactive: fg_muted,
|
|
||||||
match_bg: bright,
|
|
||||||
match_fg: bg,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: bright,
|
|
||||||
h2: medium,
|
|
||||||
h3: dim,
|
|
||||||
code: medium,
|
|
||||||
code_border: Color::Rgb(60, 60, 60),
|
|
||||||
link: bright,
|
|
||||||
link_url: dim,
|
|
||||||
quote: fg_muted,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: bright,
|
|
||||||
header_focused: bright,
|
|
||||||
divider: Color::Rgb(50, 50, 50),
|
|
||||||
scroll_indicator: Color::Rgb(70, 70, 70),
|
|
||||||
label: dim,
|
|
||||||
label_focused: medium,
|
|
||||||
label_dim: dark,
|
|
||||||
value: fg,
|
|
||||||
focused: bright,
|
|
||||||
normal: fg,
|
|
||||||
dim: dark,
|
|
||||||
path: dim,
|
|
||||||
border_magenta: medium,
|
|
||||||
border_green: medium,
|
|
||||||
border_cyan: medium,
|
|
||||||
separator: Color::Rgb(50, 50, 50),
|
|
||||||
hint_active: bright,
|
|
||||||
hint_inactive: darker,
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: bright,
|
|
||||||
word_bg: Color::Rgb(30, 30, 30),
|
|
||||||
alias: fg_muted,
|
|
||||||
stack_sig: medium,
|
|
||||||
description: fg,
|
|
||||||
example: dim,
|
|
||||||
category_focused: bright,
|
|
||||||
category_selected: medium,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: dark,
|
|
||||||
border_focused: bright,
|
|
||||||
border_normal: darker,
|
|
||||||
header_desc: dim,
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: bright,
|
|
||||||
author: medium,
|
|
||||||
link: medium,
|
|
||||||
license: dim,
|
|
||||||
prompt: dim,
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: dim,
|
|
||||||
mid: medium,
|
|
||||||
high: bright,
|
|
||||||
low_rgb: (120, 120, 120),
|
|
||||||
mid_rgb: (180, 180, 180),
|
|
||||||
high_rgb: (255, 255, 255),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(255, 255, 255),
|
|
||||||
(200, 200, 200),
|
|
||||||
(160, 160, 160),
|
|
||||||
(220, 220, 220),
|
|
||||||
(180, 180, 180),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: bright,
|
|
||||||
button_selected_bg: bright,
|
|
||||||
button_selected_fg: bg,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,280 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(255, 255, 255);
|
Palette {
|
||||||
let surface = Color::Rgb(240, 240, 240);
|
bg: (255, 255, 255),
|
||||||
let surface2 = Color::Rgb(225, 225, 225);
|
surface: (240, 240, 240),
|
||||||
let border = Color::Rgb(180, 180, 180);
|
surface2: (225, 225, 225),
|
||||||
let fg = Color::Rgb(0, 0, 0);
|
fg: (0, 0, 0),
|
||||||
let fg_dim = Color::Rgb(80, 80, 80);
|
fg_dim: (80, 80, 80),
|
||||||
let fg_muted = Color::Rgb(140, 140, 140);
|
fg_muted: (140, 140, 140),
|
||||||
|
accent: (0, 0, 0),
|
||||||
let dark = Color::Rgb(0, 0, 0);
|
red: (140, 140, 140),
|
||||||
let medium = Color::Rgb(80, 80, 80);
|
green: (0, 0, 0),
|
||||||
let dim = Color::Rgb(140, 140, 140);
|
yellow: (80, 80, 80),
|
||||||
let light = Color::Rgb(180, 180, 180);
|
blue: (80, 80, 80),
|
||||||
let lighter = Color::Rgb(210, 210, 210);
|
purple: (80, 80, 80),
|
||||||
|
cyan: (0, 0, 0),
|
||||||
ThemeColors {
|
orange: (0, 0, 0),
|
||||||
ui: UiColors {
|
tempo_color: (0, 0, 0),
|
||||||
bg,
|
bank_color: (80, 80, 80),
|
||||||
bg_rgb: (255, 255, 255),
|
pattern_color: (80, 80, 80),
|
||||||
text_primary: fg,
|
title_accent: (0, 0, 0),
|
||||||
text_muted: fg_dim,
|
title_author: (80, 80, 80),
|
||||||
text_dim: fg_muted,
|
secondary: (140, 140, 140),
|
||||||
border,
|
link_bright: [
|
||||||
header: dark,
|
(0, 0, 0), (60, 60, 60), (100, 100, 100),
|
||||||
unfocused: fg_muted,
|
(40, 40, 40), (80, 80, 80),
|
||||||
accent: dark,
|
],
|
||||||
surface,
|
link_dim: [
|
||||||
},
|
(200, 200, 200), (210, 210, 210), (215, 215, 215),
|
||||||
status: StatusColors {
|
(205, 205, 205), (212, 212, 212),
|
||||||
playing_bg: Color::Rgb(210, 210, 210),
|
],
|
||||||
playing_fg: dark,
|
sparkle: [
|
||||||
stopped_bg: Color::Rgb(230, 230, 230),
|
(0, 0, 0), (60, 60, 60), (100, 100, 100),
|
||||||
stopped_fg: medium,
|
(40, 40, 40), (80, 80, 80),
|
||||||
fill_on: dark,
|
],
|
||||||
fill_off: light,
|
meter: [(140, 140, 140), (80, 80, 80), (0, 0, 0)],
|
||||||
fill_bg: surface,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: dark,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selected_bg: Color::Rgb(200, 200, 200),
|
|
||||||
selected_fg: dark,
|
|
||||||
in_range_bg: Color::Rgb(220, 220, 220),
|
|
||||||
in_range_fg: fg,
|
|
||||||
cursor: dark,
|
|
||||||
selected: Color::Rgb(200, 200, 200),
|
|
||||||
in_range: Color::Rgb(220, 220, 220),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(180, 180, 180),
|
|
||||||
playing_active_fg: dark,
|
|
||||||
playing_inactive_bg: Color::Rgb(200, 200, 200),
|
|
||||||
playing_inactive_fg: medium,
|
|
||||||
active_bg: Color::Rgb(210, 210, 210),
|
|
||||||
active_fg: dark,
|
|
||||||
content_bg: Color::Rgb(195, 195, 195),
|
|
||||||
inactive_bg: surface,
|
|
||||||
inactive_fg: fg_dim,
|
|
||||||
active_selected_bg: Color::Rgb(170, 170, 170),
|
|
||||||
active_in_range_bg: Color::Rgb(195, 195, 195),
|
|
||||||
link_bright: [
|
|
||||||
(0, 0, 0),
|
|
||||||
(60, 60, 60),
|
|
||||||
(100, 100, 100),
|
|
||||||
(40, 40, 40),
|
|
||||||
(80, 80, 80),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(200, 200, 200),
|
|
||||||
(210, 210, 210),
|
|
||||||
(215, 215, 215),
|
|
||||||
(205, 205, 205),
|
|
||||||
(212, 212, 212),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(200, 200, 200),
|
|
||||||
tempo_fg: dark,
|
|
||||||
bank_bg: Color::Rgb(215, 215, 215),
|
|
||||||
bank_fg: medium,
|
|
||||||
pattern_bg: Color::Rgb(220, 220, 220),
|
|
||||||
pattern_fg: medium,
|
|
||||||
stats_bg: surface,
|
|
||||||
stats_fg: fg_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: dark,
|
|
||||||
border_accent: medium,
|
|
||||||
border_warn: fg_dim,
|
|
||||||
border_dim: fg_muted,
|
|
||||||
confirm: medium,
|
|
||||||
rename: medium,
|
|
||||||
input: dark,
|
|
||||||
editor: dark,
|
|
||||||
preview: fg_muted,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(200, 200, 200),
|
|
||||||
error_fg: dark,
|
|
||||||
success_bg: Color::Rgb(210, 210, 210),
|
|
||||||
success_fg: dark,
|
|
||||||
info_bg: surface,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(200, 200, 200),
|
|
||||||
playing_fg: dark,
|
|
||||||
staged_play_bg: Color::Rgb(210, 210, 210),
|
|
||||||
staged_play_fg: medium,
|
|
||||||
staged_stop_bg: Color::Rgb(220, 220, 220),
|
|
||||||
staged_stop_fg: dim,
|
|
||||||
edit_bg: Color::Rgb(215, 215, 215),
|
|
||||||
edit_fg: dark,
|
|
||||||
hover_bg: surface2,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(235, 235, 235),
|
|
||||||
muted_fg: light,
|
|
||||||
soloed_bg: Color::Rgb(190, 190, 190),
|
|
||||||
soloed_fg: dark,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: dim,
|
|
||||||
connected: dark,
|
|
||||||
listening: medium,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: bg,
|
|
||||||
executed_bg: Color::Rgb(220, 220, 220),
|
|
||||||
selected_bg: Color::Rgb(200, 200, 200),
|
|
||||||
emit: (dark, Color::Rgb(215, 215, 215)),
|
|
||||||
number: (medium, Color::Rgb(225, 225, 225)),
|
|
||||||
string: (dark, Color::Rgb(220, 220, 220)),
|
|
||||||
comment: (light, bg),
|
|
||||||
keyword: (dark, Color::Rgb(205, 205, 205)),
|
|
||||||
stack_op: (medium, Color::Rgb(230, 230, 230)),
|
|
||||||
operator: (medium, Color::Rgb(225, 225, 225)),
|
|
||||||
sound: (dark, Color::Rgb(215, 215, 215)),
|
|
||||||
param: (medium, Color::Rgb(225, 225, 225)),
|
|
||||||
context: (medium, Color::Rgb(230, 230, 230)),
|
|
||||||
note: (dark, Color::Rgb(220, 220, 220)),
|
|
||||||
interval: (medium, Color::Rgb(225, 225, 225)),
|
|
||||||
variable: (medium, Color::Rgb(230, 230, 230)),
|
|
||||||
vary: (dim, Color::Rgb(235, 235, 235)),
|
|
||||||
generator: (dark, Color::Rgb(215, 215, 215)),
|
|
||||||
user_defined: (medium, Color::Rgb(225, 225, 225)),
|
|
||||||
default: (fg_dim, bg),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: bg,
|
|
||||||
row_odd: surface,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: dark,
|
|
||||||
value: fg_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: dark,
|
|
||||||
text: fg_muted,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(200, 200, 200),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: surface,
|
|
||||||
unselected_fg: fg_muted,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(200, 200, 200),
|
|
||||||
completion_bg: surface,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: dark,
|
|
||||||
completion_example: medium,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: medium,
|
|
||||||
project_file: dark,
|
|
||||||
selected: dark,
|
|
||||||
file: fg,
|
|
||||||
focused_border: dark,
|
|
||||||
unfocused_border: fg_muted,
|
|
||||||
root: fg,
|
|
||||||
file_icon: fg_muted,
|
|
||||||
folder_icon: medium,
|
|
||||||
empty_text: fg_muted,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: dark,
|
|
||||||
cursor: fg,
|
|
||||||
hint: fg_muted,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: dark,
|
|
||||||
inactive: fg_muted,
|
|
||||||
match_bg: dark,
|
|
||||||
match_fg: bg,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: dark,
|
|
||||||
h2: medium,
|
|
||||||
h3: dim,
|
|
||||||
code: medium,
|
|
||||||
code_border: Color::Rgb(200, 200, 200),
|
|
||||||
link: dark,
|
|
||||||
link_url: dim,
|
|
||||||
quote: fg_muted,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: dark,
|
|
||||||
header_focused: dark,
|
|
||||||
divider: Color::Rgb(210, 210, 210),
|
|
||||||
scroll_indicator: Color::Rgb(180, 180, 180),
|
|
||||||
label: dim,
|
|
||||||
label_focused: medium,
|
|
||||||
label_dim: light,
|
|
||||||
value: fg,
|
|
||||||
focused: dark,
|
|
||||||
normal: fg,
|
|
||||||
dim: light,
|
|
||||||
path: dim,
|
|
||||||
border_magenta: medium,
|
|
||||||
border_green: medium,
|
|
||||||
border_cyan: medium,
|
|
||||||
separator: Color::Rgb(210, 210, 210),
|
|
||||||
hint_active: dark,
|
|
||||||
hint_inactive: lighter,
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: dark,
|
|
||||||
word_bg: Color::Rgb(230, 230, 230),
|
|
||||||
alias: fg_muted,
|
|
||||||
stack_sig: medium,
|
|
||||||
description: fg,
|
|
||||||
example: dim,
|
|
||||||
category_focused: dark,
|
|
||||||
category_selected: medium,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: light,
|
|
||||||
border_focused: dark,
|
|
||||||
border_normal: lighter,
|
|
||||||
header_desc: dim,
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: dark,
|
|
||||||
author: medium,
|
|
||||||
link: medium,
|
|
||||||
license: dim,
|
|
||||||
prompt: dim,
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: dim,
|
|
||||||
mid: medium,
|
|
||||||
high: dark,
|
|
||||||
low_rgb: (140, 140, 140),
|
|
||||||
mid_rgb: (80, 80, 80),
|
|
||||||
high_rgb: (0, 0, 0),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(0, 0, 0),
|
|
||||||
(60, 60, 60),
|
|
||||||
(100, 100, 100),
|
|
||||||
(40, 40, 40),
|
|
||||||
(80, 80, 80),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: dark,
|
|
||||||
button_selected_bg: dark,
|
|
||||||
button_selected_fg: bg,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,281 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(39, 40, 34);
|
Palette {
|
||||||
let bg_light = Color::Rgb(53, 54, 47);
|
bg: (39, 40, 34),
|
||||||
let bg_lighter = Color::Rgb(70, 71, 62);
|
surface: (53, 54, 47),
|
||||||
let fg = Color::Rgb(248, 248, 242);
|
surface2: (70, 71, 62),
|
||||||
let fg_dim = Color::Rgb(190, 190, 180);
|
fg: (248, 248, 242),
|
||||||
let comment = Color::Rgb(117, 113, 94);
|
fg_dim: (190, 190, 180),
|
||||||
let pink = Color::Rgb(249, 38, 114);
|
fg_muted: (117, 113, 94),
|
||||||
let green = Color::Rgb(166, 226, 46);
|
accent: (249, 38, 114), // pink
|
||||||
let yellow = Color::Rgb(230, 219, 116);
|
red: (249, 38, 114),
|
||||||
let blue = Color::Rgb(102, 217, 239);
|
green: (166, 226, 46),
|
||||||
let purple = Color::Rgb(174, 129, 255);
|
yellow: (230, 219, 116),
|
||||||
let orange = Color::Rgb(253, 151, 31);
|
blue: (102, 217, 239),
|
||||||
|
purple: (174, 129, 255),
|
||||||
let darker_bg = Color::Rgb(30, 31, 26);
|
cyan: (102, 217, 239),
|
||||||
|
orange: (253, 151, 31),
|
||||||
ThemeColors {
|
tempo_color: (249, 38, 114),
|
||||||
ui: UiColors {
|
bank_color: (102, 217, 239),
|
||||||
bg,
|
pattern_color: (166, 226, 46),
|
||||||
bg_rgb: (39, 40, 34),
|
title_accent: (249, 38, 114),
|
||||||
text_primary: fg,
|
title_author: (102, 217, 239),
|
||||||
text_muted: fg_dim,
|
secondary: (253, 151, 31),
|
||||||
text_dim: comment,
|
link_bright: [
|
||||||
border: bg_lighter,
|
(249, 38, 114), (174, 129, 255), (253, 151, 31),
|
||||||
header: blue,
|
(102, 217, 239), (166, 226, 46),
|
||||||
unfocused: comment,
|
],
|
||||||
accent: pink,
|
link_dim: [
|
||||||
surface: bg_light,
|
(90, 40, 60), (70, 55, 90), (85, 60, 35),
|
||||||
},
|
(50, 75, 85), (60, 80, 40),
|
||||||
status: StatusColors {
|
],
|
||||||
playing_bg: Color::Rgb(50, 65, 40),
|
sparkle: [
|
||||||
playing_fg: green,
|
(102, 217, 239), (253, 151, 31), (166, 226, 46),
|
||||||
stopped_bg: Color::Rgb(70, 40, 55),
|
(249, 38, 114), (174, 129, 255),
|
||||||
stopped_fg: pink,
|
],
|
||||||
fill_on: green,
|
meter: [(155, 215, 45), (220, 210, 105), (240, 50, 110)],
|
||||||
fill_off: comment,
|
|
||||||
fill_bg: bg_light,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: pink,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selected_bg: Color::Rgb(85, 70, 80),
|
|
||||||
selected_fg: pink,
|
|
||||||
in_range_bg: Color::Rgb(70, 65, 70),
|
|
||||||
in_range_fg: fg,
|
|
||||||
cursor: pink,
|
|
||||||
selected: Color::Rgb(85, 70, 80),
|
|
||||||
in_range: Color::Rgb(70, 65, 70),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(90, 65, 45),
|
|
||||||
playing_active_fg: orange,
|
|
||||||
playing_inactive_bg: Color::Rgb(80, 75, 50),
|
|
||||||
playing_inactive_fg: yellow,
|
|
||||||
active_bg: Color::Rgb(55, 75, 70),
|
|
||||||
active_fg: blue,
|
|
||||||
content_bg: Color::Rgb(62, 82, 77),
|
|
||||||
inactive_bg: bg_light,
|
|
||||||
inactive_fg: fg_dim,
|
|
||||||
active_selected_bg: Color::Rgb(85, 65, 80),
|
|
||||||
active_in_range_bg: Color::Rgb(70, 65, 70),
|
|
||||||
link_bright: [
|
|
||||||
(249, 38, 114),
|
|
||||||
(174, 129, 255),
|
|
||||||
(253, 151, 31),
|
|
||||||
(102, 217, 239),
|
|
||||||
(166, 226, 46),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(90, 40, 60),
|
|
||||||
(70, 55, 90),
|
|
||||||
(85, 60, 35),
|
|
||||||
(50, 75, 85),
|
|
||||||
(60, 80, 40),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(75, 50, 65),
|
|
||||||
tempo_fg: pink,
|
|
||||||
bank_bg: Color::Rgb(50, 70, 75),
|
|
||||||
bank_fg: blue,
|
|
||||||
pattern_bg: Color::Rgb(55, 75, 50),
|
|
||||||
pattern_fg: green,
|
|
||||||
stats_bg: bg_light,
|
|
||||||
stats_fg: fg_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: blue,
|
|
||||||
border_accent: pink,
|
|
||||||
border_warn: orange,
|
|
||||||
border_dim: comment,
|
|
||||||
confirm: orange,
|
|
||||||
rename: purple,
|
|
||||||
input: blue,
|
|
||||||
editor: blue,
|
|
||||||
preview: comment,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(75, 40, 55),
|
|
||||||
error_fg: pink,
|
|
||||||
success_bg: Color::Rgb(50, 70, 45),
|
|
||||||
success_fg: green,
|
|
||||||
info_bg: bg_light,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(50, 70, 45),
|
|
||||||
playing_fg: green,
|
|
||||||
staged_play_bg: Color::Rgb(70, 55, 80),
|
|
||||||
staged_play_fg: purple,
|
|
||||||
staged_stop_bg: Color::Rgb(80, 45, 60),
|
|
||||||
staged_stop_fg: pink,
|
|
||||||
edit_bg: Color::Rgb(50, 70, 70),
|
|
||||||
edit_fg: blue,
|
|
||||||
hover_bg: bg_lighter,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(48, 50, 45),
|
|
||||||
muted_fg: comment,
|
|
||||||
soloed_bg: Color::Rgb(70, 65, 45),
|
|
||||||
soloed_fg: yellow,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: pink,
|
|
||||||
connected: green,
|
|
||||||
listening: yellow,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: darker_bg,
|
|
||||||
executed_bg: Color::Rgb(55, 50, 55),
|
|
||||||
selected_bg: Color::Rgb(85, 75, 50),
|
|
||||||
emit: (fg, Color::Rgb(85, 55, 65)),
|
|
||||||
number: (purple, Color::Rgb(60, 50, 75)),
|
|
||||||
string: (yellow, Color::Rgb(70, 65, 45)),
|
|
||||||
comment: (comment, darker_bg),
|
|
||||||
keyword: (pink, Color::Rgb(80, 45, 60)),
|
|
||||||
stack_op: (blue, Color::Rgb(50, 70, 75)),
|
|
||||||
operator: (pink, Color::Rgb(80, 45, 60)),
|
|
||||||
sound: (blue, Color::Rgb(50, 70, 75)),
|
|
||||||
param: (orange, Color::Rgb(80, 60, 40)),
|
|
||||||
context: (orange, Color::Rgb(80, 60, 40)),
|
|
||||||
note: (green, Color::Rgb(55, 75, 45)),
|
|
||||||
interval: (Color::Rgb(180, 235, 80), Color::Rgb(55, 75, 40)),
|
|
||||||
variable: (green, Color::Rgb(55, 75, 45)),
|
|
||||||
vary: (yellow, Color::Rgb(70, 65, 45)),
|
|
||||||
generator: (blue, Color::Rgb(50, 70, 70)),
|
|
||||||
user_defined: (orange, Color::Rgb(60, 50, 30)),
|
|
||||||
default: (fg_dim, darker_bg),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: darker_bg,
|
|
||||||
row_odd: bg,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: orange,
|
|
||||||
value: fg_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: orange,
|
|
||||||
text: comment,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(80, 60, 75),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: bg_light,
|
|
||||||
unselected_fg: comment,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(75, 70, 75),
|
|
||||||
completion_bg: bg_light,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: orange,
|
|
||||||
completion_example: blue,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: blue,
|
|
||||||
project_file: purple,
|
|
||||||
selected: orange,
|
|
||||||
file: fg,
|
|
||||||
focused_border: orange,
|
|
||||||
unfocused_border: comment,
|
|
||||||
root: fg,
|
|
||||||
file_icon: comment,
|
|
||||||
folder_icon: blue,
|
|
||||||
empty_text: comment,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: blue,
|
|
||||||
cursor: fg,
|
|
||||||
hint: comment,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: orange,
|
|
||||||
inactive: comment,
|
|
||||||
match_bg: yellow,
|
|
||||||
match_fg: bg,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: blue,
|
|
||||||
h2: orange,
|
|
||||||
h3: purple,
|
|
||||||
code: green,
|
|
||||||
code_border: Color::Rgb(85, 85, 75),
|
|
||||||
link: pink,
|
|
||||||
link_url: Color::Rgb(130, 125, 115),
|
|
||||||
quote: comment,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: blue,
|
|
||||||
header_focused: yellow,
|
|
||||||
divider: Color::Rgb(80, 80, 72),
|
|
||||||
scroll_indicator: Color::Rgb(95, 95, 88),
|
|
||||||
label: Color::Rgb(150, 145, 135),
|
|
||||||
label_focused: Color::Rgb(180, 175, 165),
|
|
||||||
label_dim: Color::Rgb(120, 115, 105),
|
|
||||||
value: Color::Rgb(210, 205, 195),
|
|
||||||
focused: yellow,
|
|
||||||
normal: fg,
|
|
||||||
dim: Color::Rgb(95, 95, 88),
|
|
||||||
path: Color::Rgb(150, 145, 135),
|
|
||||||
border_magenta: pink,
|
|
||||||
border_green: green,
|
|
||||||
border_cyan: blue,
|
|
||||||
separator: Color::Rgb(80, 80, 72),
|
|
||||||
hint_active: Color::Rgb(220, 200, 100),
|
|
||||||
hint_inactive: Color::Rgb(80, 80, 72),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: green,
|
|
||||||
word_bg: Color::Rgb(55, 65, 60),
|
|
||||||
alias: comment,
|
|
||||||
stack_sig: purple,
|
|
||||||
description: fg,
|
|
||||||
example: Color::Rgb(150, 145, 135),
|
|
||||||
category_focused: yellow,
|
|
||||||
category_selected: blue,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: Color::Rgb(95, 95, 88),
|
|
||||||
border_focused: yellow,
|
|
||||||
border_normal: Color::Rgb(80, 80, 72),
|
|
||||||
header_desc: Color::Rgb(170, 165, 155),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: pink,
|
|
||||||
author: blue,
|
|
||||||
link: green,
|
|
||||||
license: orange,
|
|
||||||
prompt: Color::Rgb(170, 165, 155),
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: green,
|
|
||||||
mid: yellow,
|
|
||||||
high: pink,
|
|
||||||
low_rgb: (155, 215, 45),
|
|
||||||
mid_rgb: (220, 210, 105),
|
|
||||||
high_rgb: (240, 50, 110),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(102, 217, 239),
|
|
||||||
(253, 151, 31),
|
|
||||||
(166, 226, 46),
|
|
||||||
(249, 38, 114),
|
|
||||||
(174, 129, 255),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: orange,
|
|
||||||
button_selected_bg: orange,
|
|
||||||
button_selected_fg: bg,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,284 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let polar_night0 = Color::Rgb(46, 52, 64);
|
Palette {
|
||||||
let polar_night1 = Color::Rgb(59, 66, 82);
|
bg: (46, 52, 64),
|
||||||
let polar_night2 = Color::Rgb(67, 76, 94);
|
surface: (59, 66, 82),
|
||||||
let polar_night3 = Color::Rgb(76, 86, 106);
|
surface2: (67, 76, 94),
|
||||||
let snow_storm0 = Color::Rgb(216, 222, 233);
|
fg: (236, 239, 244),
|
||||||
let snow_storm2 = Color::Rgb(236, 239, 244);
|
fg_dim: (216, 222, 233),
|
||||||
let frost0 = Color::Rgb(143, 188, 187);
|
fg_muted: (76, 86, 106),
|
||||||
let frost1 = Color::Rgb(136, 192, 208);
|
accent: (136, 192, 208), // frost1
|
||||||
let frost2 = Color::Rgb(129, 161, 193);
|
red: (191, 97, 106),
|
||||||
let aurora_red = Color::Rgb(191, 97, 106);
|
green: (163, 190, 140),
|
||||||
let aurora_orange = Color::Rgb(208, 135, 112);
|
yellow: (235, 203, 139),
|
||||||
let aurora_yellow = Color::Rgb(235, 203, 139);
|
blue: (129, 161, 193), // frost2
|
||||||
let aurora_green = Color::Rgb(163, 190, 140);
|
purple: (180, 142, 173),
|
||||||
let aurora_purple = Color::Rgb(180, 142, 173);
|
cyan: (143, 188, 187), // frost0
|
||||||
|
orange: (208, 135, 112),
|
||||||
ThemeColors {
|
tempo_color: (180, 142, 173),
|
||||||
ui: UiColors {
|
bank_color: (129, 161, 193),
|
||||||
bg: polar_night0,
|
pattern_color: (143, 188, 187),
|
||||||
bg_rgb: (46, 52, 64),
|
title_accent: (136, 192, 208),
|
||||||
text_primary: snow_storm2,
|
title_author: (129, 161, 193),
|
||||||
text_muted: snow_storm0,
|
secondary: (208, 135, 112),
|
||||||
text_dim: polar_night3,
|
link_bright: [
|
||||||
border: polar_night2,
|
(136, 192, 208), (180, 142, 173), (208, 135, 112),
|
||||||
header: frost1,
|
(143, 188, 187), (163, 190, 140),
|
||||||
unfocused: polar_night3,
|
],
|
||||||
accent: frost1,
|
link_dim: [
|
||||||
surface: polar_night1,
|
(55, 75, 85), (70, 60, 70), (75, 55, 50),
|
||||||
},
|
(55, 75, 75), (60, 75, 55),
|
||||||
status: StatusColors {
|
],
|
||||||
playing_bg: Color::Rgb(50, 65, 60),
|
sparkle: [
|
||||||
playing_fg: aurora_green,
|
(136, 192, 208), (208, 135, 112), (163, 190, 140),
|
||||||
stopped_bg: Color::Rgb(65, 50, 55),
|
(180, 142, 173), (235, 203, 139),
|
||||||
stopped_fg: aurora_red,
|
],
|
||||||
fill_on: aurora_green,
|
meter: [(140, 180, 130), (220, 190, 120), (180, 90, 100)],
|
||||||
fill_off: polar_night3,
|
|
||||||
fill_bg: polar_night1,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: frost1,
|
|
||||||
cursor_fg: polar_night0,
|
|
||||||
selected_bg: Color::Rgb(70, 85, 105),
|
|
||||||
selected_fg: frost1,
|
|
||||||
in_range_bg: Color::Rgb(60, 70, 90),
|
|
||||||
in_range_fg: snow_storm0,
|
|
||||||
cursor: frost1,
|
|
||||||
selected: Color::Rgb(70, 85, 105),
|
|
||||||
in_range: Color::Rgb(60, 70, 90),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(80, 70, 65),
|
|
||||||
playing_active_fg: aurora_orange,
|
|
||||||
playing_inactive_bg: Color::Rgb(75, 70, 55),
|
|
||||||
playing_inactive_fg: aurora_yellow,
|
|
||||||
active_bg: Color::Rgb(50, 65, 65),
|
|
||||||
active_fg: frost0,
|
|
||||||
content_bg: Color::Rgb(57, 72, 72),
|
|
||||||
inactive_bg: polar_night1,
|
|
||||||
inactive_fg: snow_storm0,
|
|
||||||
active_selected_bg: Color::Rgb(75, 75, 95),
|
|
||||||
active_in_range_bg: Color::Rgb(60, 70, 85),
|
|
||||||
link_bright: [
|
|
||||||
(136, 192, 208),
|
|
||||||
(180, 142, 173),
|
|
||||||
(208, 135, 112),
|
|
||||||
(143, 188, 187),
|
|
||||||
(163, 190, 140),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(55, 75, 85),
|
|
||||||
(70, 60, 70),
|
|
||||||
(75, 55, 50),
|
|
||||||
(55, 75, 75),
|
|
||||||
(60, 75, 55),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(65, 55, 70),
|
|
||||||
tempo_fg: aurora_purple,
|
|
||||||
bank_bg: Color::Rgb(45, 60, 70),
|
|
||||||
bank_fg: frost2,
|
|
||||||
pattern_bg: Color::Rgb(50, 65, 65),
|
|
||||||
pattern_fg: frost0,
|
|
||||||
stats_bg: polar_night1,
|
|
||||||
stats_fg: snow_storm0,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: frost1,
|
|
||||||
border_accent: aurora_purple,
|
|
||||||
border_warn: aurora_orange,
|
|
||||||
border_dim: polar_night3,
|
|
||||||
confirm: aurora_orange,
|
|
||||||
rename: aurora_purple,
|
|
||||||
input: frost2,
|
|
||||||
editor: frost1,
|
|
||||||
preview: polar_night3,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(65, 50, 55),
|
|
||||||
error_fg: aurora_red,
|
|
||||||
success_bg: Color::Rgb(50, 65, 55),
|
|
||||||
success_fg: aurora_green,
|
|
||||||
info_bg: polar_night1,
|
|
||||||
info_fg: snow_storm2,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(50, 65, 55),
|
|
||||||
playing_fg: aurora_green,
|
|
||||||
staged_play_bg: Color::Rgb(65, 55, 70),
|
|
||||||
staged_play_fg: aurora_purple,
|
|
||||||
staged_stop_bg: Color::Rgb(70, 55, 60),
|
|
||||||
staged_stop_fg: aurora_red,
|
|
||||||
edit_bg: Color::Rgb(50, 65, 65),
|
|
||||||
edit_fg: frost0,
|
|
||||||
hover_bg: polar_night2,
|
|
||||||
hover_fg: snow_storm2,
|
|
||||||
muted_bg: Color::Rgb(55, 60, 70),
|
|
||||||
muted_fg: polar_night3,
|
|
||||||
soloed_bg: Color::Rgb(70, 65, 50),
|
|
||||||
soloed_fg: aurora_yellow,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: aurora_red,
|
|
||||||
connected: aurora_green,
|
|
||||||
listening: aurora_yellow,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: polar_night1,
|
|
||||||
executed_bg: Color::Rgb(55, 55, 70),
|
|
||||||
selected_bg: Color::Rgb(80, 70, 55),
|
|
||||||
emit: (snow_storm2, Color::Rgb(75, 55, 60)),
|
|
||||||
number: (aurora_orange, Color::Rgb(65, 55, 50)),
|
|
||||||
string: (aurora_green, Color::Rgb(50, 60, 50)),
|
|
||||||
comment: (polar_night3, polar_night0),
|
|
||||||
keyword: (aurora_purple, Color::Rgb(60, 50, 65)),
|
|
||||||
stack_op: (frost2, Color::Rgb(45, 55, 70)),
|
|
||||||
operator: (aurora_yellow, Color::Rgb(65, 60, 45)),
|
|
||||||
sound: (frost0, Color::Rgb(45, 60, 60)),
|
|
||||||
param: (frost1, Color::Rgb(50, 60, 70)),
|
|
||||||
context: (aurora_orange, Color::Rgb(65, 55, 50)),
|
|
||||||
note: (aurora_green, Color::Rgb(50, 60, 50)),
|
|
||||||
interval: (Color::Rgb(170, 200, 150), Color::Rgb(50, 60, 45)),
|
|
||||||
variable: (aurora_purple, Color::Rgb(60, 50, 60)),
|
|
||||||
vary: (aurora_yellow, Color::Rgb(65, 60, 45)),
|
|
||||||
generator: (frost0, Color::Rgb(45, 60, 55)),
|
|
||||||
user_defined: (aurora_orange, Color::Rgb(60, 50, 45)),
|
|
||||||
default: (snow_storm0, polar_night1),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: polar_night1,
|
|
||||||
row_odd: polar_night0,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: aurora_orange,
|
|
||||||
value: snow_storm0,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: aurora_orange,
|
|
||||||
text: polar_night3,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors {
|
|
||||||
bg: snow_storm2,
|
|
||||||
fg: polar_night0,
|
|
||||||
},
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(65, 75, 95),
|
|
||||||
selected_fg: snow_storm2,
|
|
||||||
unselected_bg: polar_night1,
|
|
||||||
unselected_fg: polar_night3,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: snow_storm2,
|
|
||||||
cursor_fg: polar_night0,
|
|
||||||
selection_bg: Color::Rgb(60, 75, 100),
|
|
||||||
completion_bg: polar_night1,
|
|
||||||
completion_fg: snow_storm2,
|
|
||||||
completion_selected: aurora_orange,
|
|
||||||
completion_example: frost0,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: frost2,
|
|
||||||
project_file: aurora_purple,
|
|
||||||
selected: aurora_orange,
|
|
||||||
file: snow_storm2,
|
|
||||||
focused_border: aurora_orange,
|
|
||||||
unfocused_border: polar_night3,
|
|
||||||
root: snow_storm2,
|
|
||||||
file_icon: polar_night3,
|
|
||||||
folder_icon: frost2,
|
|
||||||
empty_text: polar_night3,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: frost2,
|
|
||||||
cursor: snow_storm2,
|
|
||||||
hint: polar_night3,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: aurora_orange,
|
|
||||||
inactive: polar_night3,
|
|
||||||
match_bg: aurora_yellow,
|
|
||||||
match_fg: polar_night0,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: frost2,
|
|
||||||
h2: aurora_orange,
|
|
||||||
h3: aurora_purple,
|
|
||||||
code: aurora_green,
|
|
||||||
code_border: Color::Rgb(75, 85, 100),
|
|
||||||
link: frost0,
|
|
||||||
link_url: Color::Rgb(100, 110, 125),
|
|
||||||
quote: polar_night3,
|
|
||||||
text: snow_storm2,
|
|
||||||
list: snow_storm2,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: frost1,
|
|
||||||
header_focused: aurora_yellow,
|
|
||||||
divider: Color::Rgb(70, 80, 95),
|
|
||||||
scroll_indicator: Color::Rgb(85, 95, 110),
|
|
||||||
label: Color::Rgb(130, 140, 155),
|
|
||||||
label_focused: Color::Rgb(160, 170, 185),
|
|
||||||
label_dim: Color::Rgb(100, 110, 125),
|
|
||||||
value: Color::Rgb(190, 200, 215),
|
|
||||||
focused: aurora_yellow,
|
|
||||||
normal: snow_storm2,
|
|
||||||
dim: Color::Rgb(85, 95, 110),
|
|
||||||
path: Color::Rgb(130, 140, 155),
|
|
||||||
border_magenta: aurora_purple,
|
|
||||||
border_green: aurora_green,
|
|
||||||
border_cyan: frost2,
|
|
||||||
separator: Color::Rgb(70, 80, 95),
|
|
||||||
hint_active: Color::Rgb(200, 180, 100),
|
|
||||||
hint_inactive: Color::Rgb(70, 80, 95),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: aurora_green,
|
|
||||||
word_bg: Color::Rgb(50, 60, 75),
|
|
||||||
alias: polar_night3,
|
|
||||||
stack_sig: aurora_purple,
|
|
||||||
description: snow_storm2,
|
|
||||||
example: Color::Rgb(130, 140, 155),
|
|
||||||
category_focused: aurora_yellow,
|
|
||||||
category_selected: frost2,
|
|
||||||
category_normal: snow_storm2,
|
|
||||||
category_dimmed: Color::Rgb(85, 95, 110),
|
|
||||||
border_focused: aurora_yellow,
|
|
||||||
border_normal: Color::Rgb(70, 80, 95),
|
|
||||||
header_desc: Color::Rgb(150, 160, 175),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: frost1,
|
|
||||||
author: frost2,
|
|
||||||
link: frost0,
|
|
||||||
license: aurora_orange,
|
|
||||||
prompt: Color::Rgb(150, 160, 175),
|
|
||||||
subtitle: snow_storm2,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: aurora_green,
|
|
||||||
mid: aurora_yellow,
|
|
||||||
high: aurora_red,
|
|
||||||
low_rgb: (140, 180, 130),
|
|
||||||
mid_rgb: (220, 190, 120),
|
|
||||||
high_rgb: (180, 90, 100),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(136, 192, 208),
|
|
||||||
(208, 135, 112),
|
|
||||||
(163, 190, 140),
|
|
||||||
(180, 142, 173),
|
|
||||||
(235, 203, 139),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: aurora_orange,
|
|
||||||
button_selected_bg: aurora_orange,
|
|
||||||
button_selected_fg: polar_night0,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
55
crates/ratatui/src/theme/palette.rs
Normal file
55
crates/ratatui/src/theme/palette.rs
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
use ratatui::style::Color;
|
||||||
|
|
||||||
|
pub type Rgb = (u8, u8, u8);
|
||||||
|
|
||||||
|
pub struct Palette {
|
||||||
|
// Core
|
||||||
|
pub bg: Rgb,
|
||||||
|
pub surface: Rgb,
|
||||||
|
pub surface2: Rgb,
|
||||||
|
pub fg: Rgb,
|
||||||
|
pub fg_dim: Rgb,
|
||||||
|
pub fg_muted: Rgb,
|
||||||
|
// Semantic accents
|
||||||
|
pub accent: Rgb,
|
||||||
|
pub red: Rgb,
|
||||||
|
pub green: Rgb,
|
||||||
|
pub yellow: Rgb,
|
||||||
|
pub blue: Rgb,
|
||||||
|
pub purple: Rgb,
|
||||||
|
pub cyan: Rgb,
|
||||||
|
pub orange: Rgb,
|
||||||
|
// Role assignments
|
||||||
|
pub tempo_color: Rgb,
|
||||||
|
pub bank_color: Rgb,
|
||||||
|
pub pattern_color: Rgb,
|
||||||
|
pub title_accent: Rgb,
|
||||||
|
pub title_author: Rgb,
|
||||||
|
pub secondary: Rgb,
|
||||||
|
// Arrays
|
||||||
|
pub link_bright: [Rgb; 5],
|
||||||
|
pub link_dim: [Rgb; 5],
|
||||||
|
pub sparkle: [Rgb; 5],
|
||||||
|
pub meter: [Rgb; 3],
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn rgb(c: Rgb) -> Color {
|
||||||
|
Color::Rgb(c.0, c.1, c.2)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn tint(bg: Rgb, accent: Rgb, amount: f32) -> Rgb {
|
||||||
|
let mix = |b: u8, a: u8| -> u8 {
|
||||||
|
let v = b as f32 + (a as f32 - b as f32) * amount;
|
||||||
|
v.clamp(0.0, 255.0) as u8
|
||||||
|
};
|
||||||
|
(mix(bg.0, accent.0), mix(bg.1, accent.1), mix(bg.2, accent.2))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn mid(a: Rgb, b: Rgb, t: f32) -> Rgb {
|
||||||
|
tint(a, b, t)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn darken(c: Rgb, amount: f32) -> Rgb {
|
||||||
|
let d = |v: u8| -> u8 { (v as f32 * (1.0 - amount)).clamp(0.0, 255.0) as u8 };
|
||||||
|
(d(c.0), d(c.1), d(c.2))
|
||||||
|
}
|
||||||
@@ -1,282 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(0, 0, 0);
|
Palette {
|
||||||
let surface = Color::Rgb(10, 10, 10);
|
bg: (0, 0, 0),
|
||||||
let surface2 = Color::Rgb(21, 21, 21);
|
surface: (10, 10, 10),
|
||||||
let border = Color::Rgb(40, 40, 40);
|
surface2: (21, 21, 21),
|
||||||
let fg = Color::Rgb(230, 230, 230);
|
fg: (230, 230, 230),
|
||||||
let fg_dim = Color::Rgb(160, 160, 160);
|
fg_dim: (160, 160, 160),
|
||||||
let fg_muted = Color::Rgb(100, 100, 100);
|
fg_muted: (100, 100, 100),
|
||||||
|
accent: (80, 230, 230), // cyan
|
||||||
let red = Color::Rgb(255, 80, 80);
|
red: (255, 80, 80),
|
||||||
let green = Color::Rgb(80, 255, 120);
|
green: (80, 255, 120),
|
||||||
let yellow = Color::Rgb(255, 230, 80);
|
yellow: (255, 230, 80),
|
||||||
let blue = Color::Rgb(80, 180, 255);
|
blue: (80, 180, 255),
|
||||||
let purple = Color::Rgb(200, 120, 255);
|
purple: (200, 120, 255),
|
||||||
let cyan = Color::Rgb(80, 230, 230);
|
cyan: (80, 230, 230),
|
||||||
let orange = Color::Rgb(255, 160, 60);
|
orange: (255, 160, 60),
|
||||||
|
tempo_color: (200, 120, 255),
|
||||||
ThemeColors {
|
bank_color: (80, 180, 255),
|
||||||
ui: UiColors {
|
pattern_color: (80, 230, 230),
|
||||||
bg,
|
title_accent: (80, 230, 230),
|
||||||
bg_rgb: (0, 0, 0),
|
title_author: (80, 180, 255),
|
||||||
text_primary: fg,
|
secondary: (255, 160, 60),
|
||||||
text_muted: fg_dim,
|
link_bright: [
|
||||||
text_dim: fg_muted,
|
(80, 230, 230), (200, 120, 255), (255, 160, 60),
|
||||||
border,
|
(80, 180, 255), (80, 255, 120),
|
||||||
header: blue,
|
],
|
||||||
unfocused: fg_muted,
|
link_dim: [
|
||||||
accent: cyan,
|
(25, 60, 60), (50, 35, 65), (60, 45, 20),
|
||||||
surface,
|
(25, 50, 70), (25, 65, 35),
|
||||||
},
|
],
|
||||||
status: StatusColors {
|
sparkle: [
|
||||||
playing_bg: Color::Rgb(15, 35, 20),
|
(80, 230, 230), (255, 160, 60), (80, 255, 120),
|
||||||
playing_fg: green,
|
(200, 120, 255), (80, 180, 255),
|
||||||
stopped_bg: Color::Rgb(40, 15, 20),
|
],
|
||||||
stopped_fg: red,
|
meter: [(70, 240, 110), (245, 220, 75), (245, 75, 75)],
|
||||||
fill_on: green,
|
|
||||||
fill_off: fg_muted,
|
|
||||||
fill_bg: surface,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: cyan,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selected_bg: Color::Rgb(40, 50, 60),
|
|
||||||
selected_fg: cyan,
|
|
||||||
in_range_bg: Color::Rgb(25, 35, 45),
|
|
||||||
in_range_fg: fg,
|
|
||||||
cursor: cyan,
|
|
||||||
selected: Color::Rgb(40, 50, 60),
|
|
||||||
in_range: Color::Rgb(25, 35, 45),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(50, 35, 20),
|
|
||||||
playing_active_fg: orange,
|
|
||||||
playing_inactive_bg: Color::Rgb(45, 40, 15),
|
|
||||||
playing_inactive_fg: yellow,
|
|
||||||
active_bg: Color::Rgb(15, 40, 40),
|
|
||||||
active_fg: cyan,
|
|
||||||
content_bg: Color::Rgb(22, 47, 47),
|
|
||||||
inactive_bg: surface,
|
|
||||||
inactive_fg: fg_dim,
|
|
||||||
active_selected_bg: Color::Rgb(45, 40, 55),
|
|
||||||
active_in_range_bg: Color::Rgb(30, 35, 45),
|
|
||||||
link_bright: [
|
|
||||||
(80, 230, 230),
|
|
||||||
(200, 120, 255),
|
|
||||||
(255, 160, 60),
|
|
||||||
(80, 180, 255),
|
|
||||||
(80, 255, 120),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(25, 60, 60),
|
|
||||||
(50, 35, 65),
|
|
||||||
(60, 45, 20),
|
|
||||||
(25, 50, 70),
|
|
||||||
(25, 65, 35),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(50, 35, 55),
|
|
||||||
tempo_fg: purple,
|
|
||||||
bank_bg: Color::Rgb(20, 45, 60),
|
|
||||||
bank_fg: blue,
|
|
||||||
pattern_bg: Color::Rgb(20, 55, 50),
|
|
||||||
pattern_fg: cyan,
|
|
||||||
stats_bg: surface,
|
|
||||||
stats_fg: fg_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: cyan,
|
|
||||||
border_accent: purple,
|
|
||||||
border_warn: orange,
|
|
||||||
border_dim: fg_muted,
|
|
||||||
confirm: orange,
|
|
||||||
rename: purple,
|
|
||||||
input: blue,
|
|
||||||
editor: cyan,
|
|
||||||
preview: fg_muted,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(50, 15, 20),
|
|
||||||
error_fg: red,
|
|
||||||
success_bg: Color::Rgb(15, 45, 25),
|
|
||||||
success_fg: green,
|
|
||||||
info_bg: surface,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(15, 45, 25),
|
|
||||||
playing_fg: green,
|
|
||||||
staged_play_bg: Color::Rgb(45, 30, 55),
|
|
||||||
staged_play_fg: purple,
|
|
||||||
staged_stop_bg: Color::Rgb(55, 25, 30),
|
|
||||||
staged_stop_fg: red,
|
|
||||||
edit_bg: Color::Rgb(15, 45, 45),
|
|
||||||
edit_fg: cyan,
|
|
||||||
hover_bg: surface2,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(15, 15, 15),
|
|
||||||
muted_fg: fg_muted,
|
|
||||||
soloed_bg: Color::Rgb(45, 40, 15),
|
|
||||||
soloed_fg: yellow,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: red,
|
|
||||||
connected: green,
|
|
||||||
listening: yellow,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: bg,
|
|
||||||
executed_bg: Color::Rgb(25, 25, 35),
|
|
||||||
selected_bg: Color::Rgb(55, 45, 25),
|
|
||||||
emit: (fg, Color::Rgb(50, 30, 35)),
|
|
||||||
number: (orange, Color::Rgb(50, 35, 20)),
|
|
||||||
string: (green, Color::Rgb(20, 45, 25)),
|
|
||||||
comment: (fg_muted, bg),
|
|
||||||
keyword: (purple, Color::Rgb(40, 25, 50)),
|
|
||||||
stack_op: (blue, Color::Rgb(20, 40, 55)),
|
|
||||||
operator: (yellow, Color::Rgb(50, 45, 20)),
|
|
||||||
sound: (cyan, Color::Rgb(20, 45, 45)),
|
|
||||||
param: (purple, Color::Rgb(40, 25, 50)),
|
|
||||||
context: (orange, Color::Rgb(50, 35, 20)),
|
|
||||||
note: (green, Color::Rgb(20, 45, 25)),
|
|
||||||
interval: (Color::Rgb(130, 255, 150), Color::Rgb(25, 55, 35)),
|
|
||||||
variable: (purple, Color::Rgb(40, 25, 50)),
|
|
||||||
vary: (yellow, Color::Rgb(50, 45, 20)),
|
|
||||||
generator: (cyan, Color::Rgb(20, 45, 40)),
|
|
||||||
user_defined: (orange, Color::Rgb(40, 25, 10)),
|
|
||||||
default: (fg_dim, bg),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: bg,
|
|
||||||
row_odd: surface,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: orange,
|
|
||||||
value: fg_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: orange,
|
|
||||||
text: fg_muted,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(40, 45, 55),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: surface,
|
|
||||||
unselected_fg: fg_muted,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(40, 50, 65),
|
|
||||||
completion_bg: surface,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: orange,
|
|
||||||
completion_example: cyan,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: blue,
|
|
||||||
project_file: purple,
|
|
||||||
selected: orange,
|
|
||||||
file: fg,
|
|
||||||
focused_border: orange,
|
|
||||||
unfocused_border: fg_muted,
|
|
||||||
root: fg,
|
|
||||||
file_icon: fg_muted,
|
|
||||||
folder_icon: blue,
|
|
||||||
empty_text: fg_muted,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: blue,
|
|
||||||
cursor: fg,
|
|
||||||
hint: fg_muted,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: orange,
|
|
||||||
inactive: fg_muted,
|
|
||||||
match_bg: yellow,
|
|
||||||
match_fg: bg,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: blue,
|
|
||||||
h2: orange,
|
|
||||||
h3: purple,
|
|
||||||
code: green,
|
|
||||||
code_border: Color::Rgb(50, 50, 50),
|
|
||||||
link: cyan,
|
|
||||||
link_url: Color::Rgb(90, 90, 90),
|
|
||||||
quote: fg_muted,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: blue,
|
|
||||||
header_focused: yellow,
|
|
||||||
divider: Color::Rgb(45, 45, 45),
|
|
||||||
scroll_indicator: Color::Rgb(60, 60, 60),
|
|
||||||
label: Color::Rgb(130, 130, 130),
|
|
||||||
label_focused: Color::Rgb(170, 170, 170),
|
|
||||||
label_dim: Color::Rgb(90, 90, 90),
|
|
||||||
value: Color::Rgb(200, 200, 200),
|
|
||||||
focused: yellow,
|
|
||||||
normal: fg,
|
|
||||||
dim: Color::Rgb(60, 60, 60),
|
|
||||||
path: Color::Rgb(130, 130, 130),
|
|
||||||
border_magenta: purple,
|
|
||||||
border_green: green,
|
|
||||||
border_cyan: cyan,
|
|
||||||
separator: Color::Rgb(45, 45, 45),
|
|
||||||
hint_active: Color::Rgb(220, 200, 80),
|
|
||||||
hint_inactive: Color::Rgb(45, 45, 45),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: green,
|
|
||||||
word_bg: Color::Rgb(20, 30, 35),
|
|
||||||
alias: fg_muted,
|
|
||||||
stack_sig: purple,
|
|
||||||
description: fg,
|
|
||||||
example: Color::Rgb(130, 130, 130),
|
|
||||||
category_focused: yellow,
|
|
||||||
category_selected: blue,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: Color::Rgb(60, 60, 60),
|
|
||||||
border_focused: yellow,
|
|
||||||
border_normal: Color::Rgb(45, 45, 45),
|
|
||||||
header_desc: Color::Rgb(150, 150, 150),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: cyan,
|
|
||||||
author: blue,
|
|
||||||
link: green,
|
|
||||||
license: orange,
|
|
||||||
prompt: Color::Rgb(150, 150, 150),
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: green,
|
|
||||||
mid: yellow,
|
|
||||||
high: red,
|
|
||||||
low_rgb: (70, 240, 110),
|
|
||||||
mid_rgb: (245, 220, 75),
|
|
||||||
high_rgb: (245, 75, 75),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(80, 230, 230),
|
|
||||||
(255, 160, 60),
|
|
||||||
(80, 255, 120),
|
|
||||||
(200, 120, 255),
|
|
||||||
(80, 180, 255),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: orange,
|
|
||||||
button_selected_bg: orange,
|
|
||||||
button_selected_fg: bg,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,282 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(25, 23, 36);
|
Palette {
|
||||||
let bg_light = Color::Rgb(33, 32, 46);
|
bg: (25, 23, 36),
|
||||||
let bg_lighter = Color::Rgb(42, 39, 63);
|
surface: (33, 32, 46),
|
||||||
let fg = Color::Rgb(224, 222, 244);
|
surface2: (42, 39, 63),
|
||||||
let fg_dim = Color::Rgb(144, 140, 170);
|
fg: (224, 222, 244),
|
||||||
let muted = Color::Rgb(110, 106, 134);
|
fg_dim: (144, 140, 170),
|
||||||
let rose = Color::Rgb(235, 188, 186);
|
fg_muted: (110, 106, 134),
|
||||||
let gold = Color::Rgb(246, 193, 119);
|
accent: (235, 188, 186), // rose
|
||||||
let foam = Color::Rgb(156, 207, 216);
|
red: (235, 111, 146), // love
|
||||||
let iris = Color::Rgb(196, 167, 231);
|
green: (156, 207, 216), // foam
|
||||||
let pine = Color::Rgb(49, 116, 143);
|
yellow: (246, 193, 119), // gold
|
||||||
let subtle = Color::Rgb(235, 188, 186);
|
blue: (49, 116, 143), // pine
|
||||||
let love = Color::Rgb(235, 111, 146);
|
purple: (196, 167, 231), // iris
|
||||||
|
cyan: (156, 207, 216), // foam
|
||||||
let darker_bg = Color::Rgb(21, 19, 30);
|
orange: (246, 193, 119), // gold
|
||||||
|
tempo_color: (196, 167, 231),
|
||||||
ThemeColors {
|
bank_color: (156, 207, 216),
|
||||||
ui: UiColors {
|
pattern_color: (49, 116, 143),
|
||||||
bg,
|
title_accent: (235, 188, 186),
|
||||||
bg_rgb: (25, 23, 36),
|
title_author: (156, 207, 216),
|
||||||
text_primary: fg,
|
secondary: (235, 111, 146),
|
||||||
text_muted: fg_dim,
|
link_bright: [
|
||||||
text_dim: muted,
|
(235, 111, 146), (196, 167, 231), (246, 193, 119),
|
||||||
border: bg_lighter,
|
(156, 207, 216), (49, 116, 143),
|
||||||
header: foam,
|
],
|
||||||
unfocused: muted,
|
link_dim: [
|
||||||
accent: rose,
|
(75, 45, 55), (60, 50, 75), (75, 60, 45),
|
||||||
surface: bg_light,
|
(50, 65, 70), (30, 50, 55),
|
||||||
},
|
],
|
||||||
status: StatusColors {
|
sparkle: [
|
||||||
playing_bg: Color::Rgb(35, 50, 55),
|
(156, 207, 216), (246, 193, 119), (49, 116, 143),
|
||||||
playing_fg: foam,
|
(235, 111, 146), (196, 167, 231),
|
||||||
stopped_bg: Color::Rgb(55, 40, 50),
|
],
|
||||||
stopped_fg: love,
|
meter: [(156, 207, 216), (246, 193, 119), (235, 111, 146)],
|
||||||
fill_on: foam,
|
|
||||||
fill_off: muted,
|
|
||||||
fill_bg: bg_light,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: rose,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selected_bg: Color::Rgb(60, 50, 70),
|
|
||||||
selected_fg: rose,
|
|
||||||
in_range_bg: Color::Rgb(50, 45, 60),
|
|
||||||
in_range_fg: fg,
|
|
||||||
cursor: rose,
|
|
||||||
selected: Color::Rgb(60, 50, 70),
|
|
||||||
in_range: Color::Rgb(50, 45, 60),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(65, 55, 50),
|
|
||||||
playing_active_fg: gold,
|
|
||||||
playing_inactive_bg: Color::Rgb(55, 55, 55),
|
|
||||||
playing_inactive_fg: subtle,
|
|
||||||
active_bg: Color::Rgb(35, 50, 60),
|
|
||||||
active_fg: foam,
|
|
||||||
content_bg: Color::Rgb(42, 57, 67),
|
|
||||||
inactive_bg: bg_light,
|
|
||||||
inactive_fg: fg_dim,
|
|
||||||
active_selected_bg: Color::Rgb(60, 50, 70),
|
|
||||||
active_in_range_bg: Color::Rgb(50, 45, 60),
|
|
||||||
link_bright: [
|
|
||||||
(235, 111, 146),
|
|
||||||
(196, 167, 231),
|
|
||||||
(246, 193, 119),
|
|
||||||
(156, 207, 216),
|
|
||||||
(49, 116, 143),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(75, 45, 55),
|
|
||||||
(60, 50, 75),
|
|
||||||
(75, 60, 45),
|
|
||||||
(50, 65, 70),
|
|
||||||
(30, 50, 55),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(60, 45, 60),
|
|
||||||
tempo_fg: iris,
|
|
||||||
bank_bg: Color::Rgb(35, 50, 60),
|
|
||||||
bank_fg: foam,
|
|
||||||
pattern_bg: Color::Rgb(35, 55, 60),
|
|
||||||
pattern_fg: pine,
|
|
||||||
stats_bg: bg_light,
|
|
||||||
stats_fg: fg_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: foam,
|
|
||||||
border_accent: rose,
|
|
||||||
border_warn: gold,
|
|
||||||
border_dim: muted,
|
|
||||||
confirm: gold,
|
|
||||||
rename: iris,
|
|
||||||
input: foam,
|
|
||||||
editor: foam,
|
|
||||||
preview: muted,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(60, 40, 50),
|
|
||||||
error_fg: love,
|
|
||||||
success_bg: Color::Rgb(35, 55, 55),
|
|
||||||
success_fg: foam,
|
|
||||||
info_bg: bg_light,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(35, 55, 55),
|
|
||||||
playing_fg: foam,
|
|
||||||
staged_play_bg: Color::Rgb(55, 50, 70),
|
|
||||||
staged_play_fg: iris,
|
|
||||||
staged_stop_bg: Color::Rgb(60, 45, 55),
|
|
||||||
staged_stop_fg: love,
|
|
||||||
edit_bg: Color::Rgb(35, 50, 60),
|
|
||||||
edit_fg: foam,
|
|
||||||
hover_bg: bg_lighter,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(32, 30, 42),
|
|
||||||
muted_fg: muted,
|
|
||||||
soloed_bg: Color::Rgb(60, 50, 40),
|
|
||||||
soloed_fg: gold,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: love,
|
|
||||||
connected: foam,
|
|
||||||
listening: gold,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: darker_bg,
|
|
||||||
executed_bg: Color::Rgb(40, 40, 55),
|
|
||||||
selected_bg: Color::Rgb(65, 55, 50),
|
|
||||||
emit: (fg, Color::Rgb(60, 45, 60)),
|
|
||||||
number: (iris, Color::Rgb(55, 50, 70)),
|
|
||||||
string: (gold, Color::Rgb(65, 55, 45)),
|
|
||||||
comment: (muted, darker_bg),
|
|
||||||
keyword: (rose, Color::Rgb(60, 45, 55)),
|
|
||||||
stack_op: (foam, Color::Rgb(40, 55, 60)),
|
|
||||||
operator: (love, Color::Rgb(60, 45, 55)),
|
|
||||||
sound: (foam, Color::Rgb(40, 55, 60)),
|
|
||||||
param: (gold, Color::Rgb(65, 55, 45)),
|
|
||||||
context: (gold, Color::Rgb(65, 55, 45)),
|
|
||||||
note: (pine, Color::Rgb(35, 50, 55)),
|
|
||||||
interval: (Color::Rgb(100, 160, 180), Color::Rgb(35, 55, 60)),
|
|
||||||
variable: (pine, Color::Rgb(35, 50, 55)),
|
|
||||||
vary: (subtle, Color::Rgb(60, 55, 55)),
|
|
||||||
generator: (foam, Color::Rgb(40, 55, 60)),
|
|
||||||
user_defined: (love, Color::Rgb(55, 35, 45)),
|
|
||||||
default: (fg_dim, darker_bg),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: darker_bg,
|
|
||||||
row_odd: bg,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: gold,
|
|
||||||
value: fg_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: gold,
|
|
||||||
text: muted,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(60, 50, 70),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: bg_light,
|
|
||||||
unselected_fg: muted,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(55, 50, 70),
|
|
||||||
completion_bg: bg_light,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: gold,
|
|
||||||
completion_example: foam,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: foam,
|
|
||||||
project_file: iris,
|
|
||||||
selected: gold,
|
|
||||||
file: fg,
|
|
||||||
focused_border: gold,
|
|
||||||
unfocused_border: muted,
|
|
||||||
root: fg,
|
|
||||||
file_icon: muted,
|
|
||||||
folder_icon: foam,
|
|
||||||
empty_text: muted,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: foam,
|
|
||||||
cursor: fg,
|
|
||||||
hint: muted,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: gold,
|
|
||||||
inactive: muted,
|
|
||||||
match_bg: gold,
|
|
||||||
match_fg: bg,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: foam,
|
|
||||||
h2: gold,
|
|
||||||
h3: iris,
|
|
||||||
code: pine,
|
|
||||||
code_border: Color::Rgb(60, 55, 75),
|
|
||||||
link: rose,
|
|
||||||
link_url: Color::Rgb(100, 95, 120),
|
|
||||||
quote: muted,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: foam,
|
|
||||||
header_focused: gold,
|
|
||||||
divider: Color::Rgb(55, 52, 70),
|
|
||||||
scroll_indicator: Color::Rgb(70, 65, 90),
|
|
||||||
label: Color::Rgb(130, 125, 155),
|
|
||||||
label_focused: Color::Rgb(160, 155, 185),
|
|
||||||
label_dim: Color::Rgb(100, 95, 125),
|
|
||||||
value: Color::Rgb(200, 195, 220),
|
|
||||||
focused: gold,
|
|
||||||
normal: fg,
|
|
||||||
dim: Color::Rgb(70, 65, 90),
|
|
||||||
path: Color::Rgb(130, 125, 155),
|
|
||||||
border_magenta: iris,
|
|
||||||
border_green: foam,
|
|
||||||
border_cyan: pine,
|
|
||||||
separator: Color::Rgb(55, 52, 70),
|
|
||||||
hint_active: Color::Rgb(230, 180, 110),
|
|
||||||
hint_inactive: Color::Rgb(55, 52, 70),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: pine,
|
|
||||||
word_bg: Color::Rgb(40, 50, 55),
|
|
||||||
alias: muted,
|
|
||||||
stack_sig: iris,
|
|
||||||
description: fg,
|
|
||||||
example: Color::Rgb(130, 125, 155),
|
|
||||||
category_focused: gold,
|
|
||||||
category_selected: foam,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: Color::Rgb(70, 65, 90),
|
|
||||||
border_focused: gold,
|
|
||||||
border_normal: Color::Rgb(55, 52, 70),
|
|
||||||
header_desc: Color::Rgb(150, 145, 175),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: rose,
|
|
||||||
author: foam,
|
|
||||||
link: pine,
|
|
||||||
license: gold,
|
|
||||||
prompt: Color::Rgb(150, 145, 175),
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: foam,
|
|
||||||
mid: gold,
|
|
||||||
high: love,
|
|
||||||
low_rgb: (156, 207, 216),
|
|
||||||
mid_rgb: (246, 193, 119),
|
|
||||||
high_rgb: (235, 111, 146),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(156, 207, 216),
|
|
||||||
(246, 193, 119),
|
|
||||||
(49, 116, 143),
|
|
||||||
(235, 111, 146),
|
|
||||||
(196, 167, 231),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: gold,
|
|
||||||
button_selected_bg: gold,
|
|
||||||
button_selected_fg: bg,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,282 +1,39 @@
|
|||||||
use super::*;
|
use super::palette::Palette;
|
||||||
use ratatui::style::Color;
|
|
||||||
|
|
||||||
pub fn theme() -> ThemeColors {
|
pub fn palette() -> Palette {
|
||||||
let bg = Color::Rgb(26, 27, 38);
|
Palette {
|
||||||
let bg_light = Color::Rgb(36, 40, 59);
|
bg: (26, 27, 38),
|
||||||
let bg_lighter = Color::Rgb(52, 59, 88);
|
surface: (36, 40, 59),
|
||||||
let fg = Color::Rgb(169, 177, 214);
|
surface2: (52, 59, 88),
|
||||||
let fg_dim = Color::Rgb(130, 140, 180);
|
fg: (169, 177, 214),
|
||||||
let comment = Color::Rgb(86, 95, 137);
|
fg_dim: (130, 140, 180),
|
||||||
let blue = Color::Rgb(122, 162, 247);
|
fg_muted: (86, 95, 137),
|
||||||
let purple = Color::Rgb(187, 154, 247);
|
accent: (187, 154, 247), // purple
|
||||||
let green = Color::Rgb(158, 206, 106);
|
red: (247, 118, 142),
|
||||||
let red = Color::Rgb(247, 118, 142);
|
green: (158, 206, 106),
|
||||||
let orange = Color::Rgb(224, 175, 104);
|
yellow: (224, 175, 104),
|
||||||
let cyan = Color::Rgb(125, 207, 255);
|
blue: (122, 162, 247),
|
||||||
let yellow = Color::Rgb(224, 175, 104);
|
purple: (187, 154, 247),
|
||||||
|
cyan: (125, 207, 255),
|
||||||
let darker_bg = Color::Rgb(22, 23, 32);
|
orange: (224, 175, 104),
|
||||||
|
tempo_color: (187, 154, 247),
|
||||||
ThemeColors {
|
bank_color: (122, 162, 247),
|
||||||
ui: UiColors {
|
pattern_color: (158, 206, 106),
|
||||||
bg,
|
title_accent: (187, 154, 247),
|
||||||
bg_rgb: (26, 27, 38),
|
title_author: (122, 162, 247),
|
||||||
text_primary: fg,
|
secondary: (224, 175, 104),
|
||||||
text_muted: fg_dim,
|
link_bright: [
|
||||||
text_dim: comment,
|
(247, 118, 142), (187, 154, 247), (224, 175, 104),
|
||||||
border: bg_lighter,
|
(125, 207, 255), (158, 206, 106),
|
||||||
header: blue,
|
],
|
||||||
unfocused: comment,
|
link_dim: [
|
||||||
accent: purple,
|
(80, 45, 55), (65, 55, 85), (75, 60, 40),
|
||||||
surface: bg_light,
|
(45, 70, 85), (55, 70, 45),
|
||||||
},
|
],
|
||||||
status: StatusColors {
|
sparkle: [
|
||||||
playing_bg: Color::Rgb(45, 60, 50),
|
(125, 207, 255), (224, 175, 104), (158, 206, 106),
|
||||||
playing_fg: green,
|
(247, 118, 142), (187, 154, 247),
|
||||||
stopped_bg: Color::Rgb(60, 40, 50),
|
],
|
||||||
stopped_fg: red,
|
meter: [(158, 206, 106), (224, 175, 104), (247, 118, 142)],
|
||||||
fill_on: green,
|
|
||||||
fill_off: comment,
|
|
||||||
fill_bg: bg_light,
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: purple,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selected_bg: Color::Rgb(70, 60, 90),
|
|
||||||
selected_fg: purple,
|
|
||||||
in_range_bg: Color::Rgb(55, 55, 75),
|
|
||||||
in_range_fg: fg,
|
|
||||||
cursor: purple,
|
|
||||||
selected: Color::Rgb(70, 60, 90),
|
|
||||||
in_range: Color::Rgb(55, 55, 75),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: Color::Rgb(70, 60, 45),
|
|
||||||
playing_active_fg: orange,
|
|
||||||
playing_inactive_bg: Color::Rgb(60, 60, 50),
|
|
||||||
playing_inactive_fg: yellow,
|
|
||||||
active_bg: Color::Rgb(45, 60, 75),
|
|
||||||
active_fg: blue,
|
|
||||||
content_bg: Color::Rgb(52, 67, 82),
|
|
||||||
inactive_bg: bg_light,
|
|
||||||
inactive_fg: fg_dim,
|
|
||||||
active_selected_bg: Color::Rgb(70, 55, 85),
|
|
||||||
active_in_range_bg: Color::Rgb(55, 55, 75),
|
|
||||||
link_bright: [
|
|
||||||
(247, 118, 142),
|
|
||||||
(187, 154, 247),
|
|
||||||
(224, 175, 104),
|
|
||||||
(125, 207, 255),
|
|
||||||
(158, 206, 106),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
(80, 45, 55),
|
|
||||||
(65, 55, 85),
|
|
||||||
(75, 60, 40),
|
|
||||||
(45, 70, 85),
|
|
||||||
(55, 70, 45),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: Color::Rgb(65, 50, 70),
|
|
||||||
tempo_fg: purple,
|
|
||||||
bank_bg: Color::Rgb(45, 55, 75),
|
|
||||||
bank_fg: blue,
|
|
||||||
pattern_bg: Color::Rgb(50, 65, 50),
|
|
||||||
pattern_fg: green,
|
|
||||||
stats_bg: bg_light,
|
|
||||||
stats_fg: fg_dim,
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: blue,
|
|
||||||
border_accent: purple,
|
|
||||||
border_warn: orange,
|
|
||||||
border_dim: comment,
|
|
||||||
confirm: orange,
|
|
||||||
rename: purple,
|
|
||||||
input: blue,
|
|
||||||
editor: blue,
|
|
||||||
preview: comment,
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: Color::Rgb(65, 40, 50),
|
|
||||||
error_fg: red,
|
|
||||||
success_bg: Color::Rgb(45, 60, 45),
|
|
||||||
success_fg: green,
|
|
||||||
info_bg: bg_light,
|
|
||||||
info_fg: fg,
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: Color::Rgb(45, 60, 45),
|
|
||||||
playing_fg: green,
|
|
||||||
staged_play_bg: Color::Rgb(60, 50, 75),
|
|
||||||
staged_play_fg: purple,
|
|
||||||
staged_stop_bg: Color::Rgb(70, 45, 55),
|
|
||||||
staged_stop_fg: red,
|
|
||||||
edit_bg: Color::Rgb(45, 55, 70),
|
|
||||||
edit_fg: blue,
|
|
||||||
hover_bg: bg_lighter,
|
|
||||||
hover_fg: fg,
|
|
||||||
muted_bg: Color::Rgb(35, 38, 50),
|
|
||||||
muted_fg: comment,
|
|
||||||
soloed_bg: Color::Rgb(60, 55, 40),
|
|
||||||
soloed_fg: yellow,
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: red,
|
|
||||||
connected: green,
|
|
||||||
listening: yellow,
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: darker_bg,
|
|
||||||
executed_bg: Color::Rgb(45, 45, 60),
|
|
||||||
selected_bg: Color::Rgb(70, 60, 50),
|
|
||||||
emit: (fg, Color::Rgb(70, 50, 65)),
|
|
||||||
number: (purple, Color::Rgb(55, 50, 70)),
|
|
||||||
string: (green, Color::Rgb(50, 60, 50)),
|
|
||||||
comment: (comment, darker_bg),
|
|
||||||
keyword: (purple, Color::Rgb(60, 50, 70)),
|
|
||||||
stack_op: (cyan, Color::Rgb(45, 60, 75)),
|
|
||||||
operator: (red, Color::Rgb(65, 45, 55)),
|
|
||||||
sound: (blue, Color::Rgb(45, 55, 70)),
|
|
||||||
param: (orange, Color::Rgb(70, 55, 45)),
|
|
||||||
context: (orange, Color::Rgb(70, 55, 45)),
|
|
||||||
note: (green, Color::Rgb(50, 60, 45)),
|
|
||||||
interval: (Color::Rgb(180, 220, 130), Color::Rgb(50, 65, 45)),
|
|
||||||
variable: (green, Color::Rgb(50, 60, 45)),
|
|
||||||
vary: (yellow, Color::Rgb(70, 60, 45)),
|
|
||||||
generator: (cyan, Color::Rgb(45, 60, 75)),
|
|
||||||
user_defined: (orange, Color::Rgb(60, 50, 35)),
|
|
||||||
default: (fg_dim, darker_bg),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: darker_bg,
|
|
||||||
row_odd: bg,
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: orange,
|
|
||||||
value: fg_dim,
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: orange,
|
|
||||||
text: comment,
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors { bg: fg, fg: bg },
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: Color::Rgb(65, 55, 80),
|
|
||||||
selected_fg: fg,
|
|
||||||
unselected_bg: bg_light,
|
|
||||||
unselected_fg: comment,
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: fg,
|
|
||||||
cursor_fg: bg,
|
|
||||||
selection_bg: Color::Rgb(60, 60, 80),
|
|
||||||
completion_bg: bg_light,
|
|
||||||
completion_fg: fg,
|
|
||||||
completion_selected: orange,
|
|
||||||
completion_example: cyan,
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: blue,
|
|
||||||
project_file: purple,
|
|
||||||
selected: orange,
|
|
||||||
file: fg,
|
|
||||||
focused_border: orange,
|
|
||||||
unfocused_border: comment,
|
|
||||||
root: fg,
|
|
||||||
file_icon: comment,
|
|
||||||
folder_icon: blue,
|
|
||||||
empty_text: comment,
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: blue,
|
|
||||||
cursor: fg,
|
|
||||||
hint: comment,
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: orange,
|
|
||||||
inactive: comment,
|
|
||||||
match_bg: yellow,
|
|
||||||
match_fg: bg,
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: blue,
|
|
||||||
h2: orange,
|
|
||||||
h3: purple,
|
|
||||||
code: green,
|
|
||||||
code_border: Color::Rgb(70, 75, 95),
|
|
||||||
link: red,
|
|
||||||
link_url: Color::Rgb(110, 120, 160),
|
|
||||||
quote: comment,
|
|
||||||
text: fg,
|
|
||||||
list: fg,
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: blue,
|
|
||||||
header_focused: yellow,
|
|
||||||
divider: Color::Rgb(65, 70, 90),
|
|
||||||
scroll_indicator: Color::Rgb(80, 85, 110),
|
|
||||||
label: Color::Rgb(130, 140, 175),
|
|
||||||
label_focused: Color::Rgb(160, 170, 200),
|
|
||||||
label_dim: Color::Rgb(100, 110, 145),
|
|
||||||
value: Color::Rgb(190, 195, 220),
|
|
||||||
focused: yellow,
|
|
||||||
normal: fg,
|
|
||||||
dim: Color::Rgb(80, 85, 110),
|
|
||||||
path: Color::Rgb(130, 140, 175),
|
|
||||||
border_magenta: purple,
|
|
||||||
border_green: green,
|
|
||||||
border_cyan: cyan,
|
|
||||||
separator: Color::Rgb(65, 70, 90),
|
|
||||||
hint_active: Color::Rgb(210, 180, 100),
|
|
||||||
hint_inactive: Color::Rgb(65, 70, 90),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: green,
|
|
||||||
word_bg: Color::Rgb(45, 55, 60),
|
|
||||||
alias: comment,
|
|
||||||
stack_sig: purple,
|
|
||||||
description: fg,
|
|
||||||
example: Color::Rgb(130, 140, 175),
|
|
||||||
category_focused: yellow,
|
|
||||||
category_selected: blue,
|
|
||||||
category_normal: fg,
|
|
||||||
category_dimmed: Color::Rgb(80, 85, 110),
|
|
||||||
border_focused: yellow,
|
|
||||||
border_normal: Color::Rgb(65, 70, 90),
|
|
||||||
header_desc: Color::Rgb(150, 160, 190),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: purple,
|
|
||||||
author: blue,
|
|
||||||
link: green,
|
|
||||||
license: orange,
|
|
||||||
prompt: Color::Rgb(150, 160, 190),
|
|
||||||
subtitle: fg,
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: green,
|
|
||||||
mid: yellow,
|
|
||||||
high: red,
|
|
||||||
low_rgb: (158, 206, 106),
|
|
||||||
mid_rgb: (224, 175, 104),
|
|
||||||
high_rgb: (247, 118, 142),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
(125, 207, 255),
|
|
||||||
(224, 175, 104),
|
|
||||||
(158, 206, 106),
|
|
||||||
(247, 118, 142),
|
|
||||||
(187, 154, 247),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: orange,
|
|
||||||
button_selected_bg: orange,
|
|
||||||
button_selected_fg: bg,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
use ratatui::style::Color;
|
use super::palette::{Palette, Rgb};
|
||||||
use super::*;
|
use super::build::build;
|
||||||
|
use super::ThemeColors;
|
||||||
|
|
||||||
fn rgb_to_hsv(r: u8, g: u8, b: u8) -> (f32, f32, f32) {
|
fn rgb_to_hsv(r: u8, g: u8, b: u8) -> (f32, f32, f32) {
|
||||||
let r = r as f32 / 255.0;
|
let r = r as f32 / 255.0;
|
||||||
let g = g as f32 / 255.0;
|
let g = g as f32 / 255.0;
|
||||||
let b = b as f32 / 255.0;
|
let b = b as f32 / 255.0;
|
||||||
|
|
||||||
let max = r.max(g).max(b);
|
let max = r.max(g).max(b);
|
||||||
let min = r.min(g).min(b);
|
let min = r.min(g).min(b);
|
||||||
let delta = max - min;
|
let delta = max - min;
|
||||||
|
|
||||||
let h = if delta == 0.0 {
|
let h = if delta == 0.0 {
|
||||||
0.0
|
0.0
|
||||||
} else if max == r {
|
} else if max == r {
|
||||||
@@ -19,19 +18,15 @@ fn rgb_to_hsv(r: u8, g: u8, b: u8) -> (f32, f32, f32) {
|
|||||||
} else {
|
} else {
|
||||||
60.0 * (((r - g) / delta) + 4.0)
|
60.0 * (((r - g) / delta) + 4.0)
|
||||||
};
|
};
|
||||||
|
|
||||||
let h = if h < 0.0 { h + 360.0 } else { h };
|
let h = if h < 0.0 { h + 360.0 } else { h };
|
||||||
let s = if max == 0.0 { 0.0 } else { delta / max };
|
let s = if max == 0.0 { 0.0 } else { delta / max };
|
||||||
let v = max;
|
(h, s, max)
|
||||||
|
|
||||||
(h, s, v)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hsv_to_rgb(h: f32, s: f32, v: f32) -> (u8, u8, u8) {
|
fn hsv_to_rgb(h: f32, s: f32, v: f32) -> (u8, u8, u8) {
|
||||||
let c = v * s;
|
let c = v * s;
|
||||||
let x = c * (1.0 - ((h / 60.0) % 2.0 - 1.0).abs());
|
let x = c * (1.0 - ((h / 60.0) % 2.0 - 1.0).abs());
|
||||||
let m = v - c;
|
let m = v - c;
|
||||||
|
|
||||||
let (r, g, b) = if h < 60.0 {
|
let (r, g, b) = if h < 60.0 {
|
||||||
(c, x, 0.0)
|
(c, x, 0.0)
|
||||||
} else if h < 120.0 {
|
} else if h < 120.0 {
|
||||||
@@ -45,7 +40,6 @@ fn hsv_to_rgb(h: f32, s: f32, v: f32) -> (u8, u8, u8) {
|
|||||||
} else {
|
} else {
|
||||||
(c, 0.0, x)
|
(c, 0.0, x)
|
||||||
};
|
};
|
||||||
|
|
||||||
(
|
(
|
||||||
((r + m) * 255.0) as u8,
|
((r + m) * 255.0) as u8,
|
||||||
((g + m) * 255.0) as u8,
|
((g + m) * 255.0) as u8,
|
||||||
@@ -53,298 +47,50 @@ fn hsv_to_rgb(h: f32, s: f32, v: f32) -> (u8, u8, u8) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rotate_hue_rgb(r: u8, g: u8, b: u8, degrees: f32) -> (u8, u8, u8) {
|
fn rotate(c: Rgb, degrees: f32) -> Rgb {
|
||||||
let (h, s, v) = rgb_to_hsv(r, g, b);
|
let (h, s, v) = rgb_to_hsv(c.0, c.1, c.2);
|
||||||
let new_h = (h + degrees) % 360.0;
|
let new_h = (h + degrees) % 360.0;
|
||||||
let new_h = if new_h < 0.0 { new_h + 360.0 } else { new_h };
|
let new_h = if new_h < 0.0 { new_h + 360.0 } else { new_h };
|
||||||
hsv_to_rgb(new_h, s, v)
|
hsv_to_rgb(new_h, s, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rotate_color(color: Color, degrees: f32) -> Color {
|
fn rotate5(arr: [Rgb; 5], d: f32) -> [Rgb; 5] {
|
||||||
match color {
|
[rotate(arr[0], d), rotate(arr[1], d), rotate(arr[2], d), rotate(arr[3], d), rotate(arr[4], d)]
|
||||||
Color::Rgb(r, g, b) => {
|
|
||||||
let (nr, ng, nb) = rotate_hue_rgb(r, g, b, degrees);
|
|
||||||
Color::Rgb(nr, ng, nb)
|
|
||||||
}
|
|
||||||
_ => color,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rotate_tuple(tuple: (u8, u8, u8), degrees: f32) -> (u8, u8, u8) {
|
fn rotate3(arr: [Rgb; 3], d: f32) -> [Rgb; 3] {
|
||||||
rotate_hue_rgb(tuple.0, tuple.1, tuple.2, degrees)
|
[rotate(arr[0], d), rotate(arr[1], d), rotate(arr[2], d)]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn rotate_color_pair(pair: (Color, Color), degrees: f32) -> (Color, Color) {
|
pub fn rotate_palette(palette: &Palette, degrees: f32) -> ThemeColors {
|
||||||
(rotate_color(pair.0, degrees), rotate_color(pair.1, degrees))
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn rotate_theme(theme: ThemeColors, degrees: f32) -> ThemeColors {
|
|
||||||
if degrees == 0.0 {
|
if degrees == 0.0 {
|
||||||
return theme;
|
return build(palette);
|
||||||
}
|
|
||||||
|
|
||||||
ThemeColors {
|
|
||||||
ui: UiColors {
|
|
||||||
bg: rotate_color(theme.ui.bg, degrees),
|
|
||||||
bg_rgb: rotate_tuple(theme.ui.bg_rgb, degrees),
|
|
||||||
text_primary: rotate_color(theme.ui.text_primary, degrees),
|
|
||||||
text_muted: rotate_color(theme.ui.text_muted, degrees),
|
|
||||||
text_dim: rotate_color(theme.ui.text_dim, degrees),
|
|
||||||
border: rotate_color(theme.ui.border, degrees),
|
|
||||||
header: rotate_color(theme.ui.header, degrees),
|
|
||||||
unfocused: rotate_color(theme.ui.unfocused, degrees),
|
|
||||||
accent: rotate_color(theme.ui.accent, degrees),
|
|
||||||
surface: rotate_color(theme.ui.surface, degrees),
|
|
||||||
},
|
|
||||||
status: StatusColors {
|
|
||||||
playing_bg: rotate_color(theme.status.playing_bg, degrees),
|
|
||||||
playing_fg: rotate_color(theme.status.playing_fg, degrees),
|
|
||||||
stopped_bg: rotate_color(theme.status.stopped_bg, degrees),
|
|
||||||
stopped_fg: rotate_color(theme.status.stopped_fg, degrees),
|
|
||||||
fill_on: rotate_color(theme.status.fill_on, degrees),
|
|
||||||
fill_off: rotate_color(theme.status.fill_off, degrees),
|
|
||||||
fill_bg: rotate_color(theme.status.fill_bg, degrees),
|
|
||||||
},
|
|
||||||
selection: SelectionColors {
|
|
||||||
cursor_bg: rotate_color(theme.selection.cursor_bg, degrees),
|
|
||||||
cursor_fg: rotate_color(theme.selection.cursor_fg, degrees),
|
|
||||||
selected_bg: rotate_color(theme.selection.selected_bg, degrees),
|
|
||||||
selected_fg: rotate_color(theme.selection.selected_fg, degrees),
|
|
||||||
in_range_bg: rotate_color(theme.selection.in_range_bg, degrees),
|
|
||||||
in_range_fg: rotate_color(theme.selection.in_range_fg, degrees),
|
|
||||||
cursor: rotate_color(theme.selection.cursor, degrees),
|
|
||||||
selected: rotate_color(theme.selection.selected, degrees),
|
|
||||||
in_range: rotate_color(theme.selection.in_range, degrees),
|
|
||||||
},
|
|
||||||
tile: TileColors {
|
|
||||||
playing_active_bg: rotate_color(theme.tile.playing_active_bg, degrees),
|
|
||||||
playing_active_fg: rotate_color(theme.tile.playing_active_fg, degrees),
|
|
||||||
playing_inactive_bg: rotate_color(theme.tile.playing_inactive_bg, degrees),
|
|
||||||
playing_inactive_fg: rotate_color(theme.tile.playing_inactive_fg, degrees),
|
|
||||||
active_bg: rotate_color(theme.tile.active_bg, degrees),
|
|
||||||
active_fg: rotate_color(theme.tile.active_fg, degrees),
|
|
||||||
content_bg: rotate_color(theme.tile.content_bg, degrees),
|
|
||||||
inactive_bg: rotate_color(theme.tile.inactive_bg, degrees),
|
|
||||||
inactive_fg: rotate_color(theme.tile.inactive_fg, degrees),
|
|
||||||
active_selected_bg: rotate_color(theme.tile.active_selected_bg, degrees),
|
|
||||||
active_in_range_bg: rotate_color(theme.tile.active_in_range_bg, degrees),
|
|
||||||
link_bright: [
|
|
||||||
rotate_tuple(theme.tile.link_bright[0], degrees),
|
|
||||||
rotate_tuple(theme.tile.link_bright[1], degrees),
|
|
||||||
rotate_tuple(theme.tile.link_bright[2], degrees),
|
|
||||||
rotate_tuple(theme.tile.link_bright[3], degrees),
|
|
||||||
rotate_tuple(theme.tile.link_bright[4], degrees),
|
|
||||||
],
|
|
||||||
link_dim: [
|
|
||||||
rotate_tuple(theme.tile.link_dim[0], degrees),
|
|
||||||
rotate_tuple(theme.tile.link_dim[1], degrees),
|
|
||||||
rotate_tuple(theme.tile.link_dim[2], degrees),
|
|
||||||
rotate_tuple(theme.tile.link_dim[3], degrees),
|
|
||||||
rotate_tuple(theme.tile.link_dim[4], degrees),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
header: HeaderColors {
|
|
||||||
tempo_bg: rotate_color(theme.header.tempo_bg, degrees),
|
|
||||||
tempo_fg: rotate_color(theme.header.tempo_fg, degrees),
|
|
||||||
bank_bg: rotate_color(theme.header.bank_bg, degrees),
|
|
||||||
bank_fg: rotate_color(theme.header.bank_fg, degrees),
|
|
||||||
pattern_bg: rotate_color(theme.header.pattern_bg, degrees),
|
|
||||||
pattern_fg: rotate_color(theme.header.pattern_fg, degrees),
|
|
||||||
stats_bg: rotate_color(theme.header.stats_bg, degrees),
|
|
||||||
stats_fg: rotate_color(theme.header.stats_fg, degrees),
|
|
||||||
},
|
|
||||||
modal: ModalColors {
|
|
||||||
border: rotate_color(theme.modal.border, degrees),
|
|
||||||
border_accent: rotate_color(theme.modal.border_accent, degrees),
|
|
||||||
border_warn: rotate_color(theme.modal.border_warn, degrees),
|
|
||||||
border_dim: rotate_color(theme.modal.border_dim, degrees),
|
|
||||||
confirm: rotate_color(theme.modal.confirm, degrees),
|
|
||||||
rename: rotate_color(theme.modal.rename, degrees),
|
|
||||||
input: rotate_color(theme.modal.input, degrees),
|
|
||||||
editor: rotate_color(theme.modal.editor, degrees),
|
|
||||||
preview: rotate_color(theme.modal.preview, degrees),
|
|
||||||
},
|
|
||||||
flash: FlashColors {
|
|
||||||
error_bg: rotate_color(theme.flash.error_bg, degrees),
|
|
||||||
error_fg: rotate_color(theme.flash.error_fg, degrees),
|
|
||||||
success_bg: rotate_color(theme.flash.success_bg, degrees),
|
|
||||||
success_fg: rotate_color(theme.flash.success_fg, degrees),
|
|
||||||
info_bg: rotate_color(theme.flash.info_bg, degrees),
|
|
||||||
info_fg: rotate_color(theme.flash.info_fg, degrees),
|
|
||||||
},
|
|
||||||
list: ListColors {
|
|
||||||
playing_bg: rotate_color(theme.list.playing_bg, degrees),
|
|
||||||
playing_fg: rotate_color(theme.list.playing_fg, degrees),
|
|
||||||
staged_play_bg: rotate_color(theme.list.staged_play_bg, degrees),
|
|
||||||
staged_play_fg: rotate_color(theme.list.staged_play_fg, degrees),
|
|
||||||
staged_stop_bg: rotate_color(theme.list.staged_stop_bg, degrees),
|
|
||||||
staged_stop_fg: rotate_color(theme.list.staged_stop_fg, degrees),
|
|
||||||
edit_bg: rotate_color(theme.list.edit_bg, degrees),
|
|
||||||
edit_fg: rotate_color(theme.list.edit_fg, degrees),
|
|
||||||
hover_bg: rotate_color(theme.list.hover_bg, degrees),
|
|
||||||
hover_fg: rotate_color(theme.list.hover_fg, degrees),
|
|
||||||
muted_bg: rotate_color(theme.list.muted_bg, degrees),
|
|
||||||
muted_fg: rotate_color(theme.list.muted_fg, degrees),
|
|
||||||
soloed_bg: rotate_color(theme.list.soloed_bg, degrees),
|
|
||||||
soloed_fg: rotate_color(theme.list.soloed_fg, degrees),
|
|
||||||
},
|
|
||||||
link_status: LinkStatusColors {
|
|
||||||
disabled: rotate_color(theme.link_status.disabled, degrees),
|
|
||||||
connected: rotate_color(theme.link_status.connected, degrees),
|
|
||||||
listening: rotate_color(theme.link_status.listening, degrees),
|
|
||||||
},
|
|
||||||
syntax: SyntaxColors {
|
|
||||||
gap_bg: rotate_color(theme.syntax.gap_bg, degrees),
|
|
||||||
executed_bg: rotate_color(theme.syntax.executed_bg, degrees),
|
|
||||||
selected_bg: rotate_color(theme.syntax.selected_bg, degrees),
|
|
||||||
emit: rotate_color_pair(theme.syntax.emit, degrees),
|
|
||||||
number: rotate_color_pair(theme.syntax.number, degrees),
|
|
||||||
string: rotate_color_pair(theme.syntax.string, degrees),
|
|
||||||
comment: rotate_color_pair(theme.syntax.comment, degrees),
|
|
||||||
keyword: rotate_color_pair(theme.syntax.keyword, degrees),
|
|
||||||
stack_op: rotate_color_pair(theme.syntax.stack_op, degrees),
|
|
||||||
operator: rotate_color_pair(theme.syntax.operator, degrees),
|
|
||||||
sound: rotate_color_pair(theme.syntax.sound, degrees),
|
|
||||||
param: rotate_color_pair(theme.syntax.param, degrees),
|
|
||||||
context: rotate_color_pair(theme.syntax.context, degrees),
|
|
||||||
note: rotate_color_pair(theme.syntax.note, degrees),
|
|
||||||
interval: rotate_color_pair(theme.syntax.interval, degrees),
|
|
||||||
variable: rotate_color_pair(theme.syntax.variable, degrees),
|
|
||||||
vary: rotate_color_pair(theme.syntax.vary, degrees),
|
|
||||||
generator: rotate_color_pair(theme.syntax.generator, degrees),
|
|
||||||
user_defined: rotate_color_pair(theme.syntax.user_defined, degrees),
|
|
||||||
default: rotate_color_pair(theme.syntax.default, degrees),
|
|
||||||
},
|
|
||||||
table: TableColors {
|
|
||||||
row_even: rotate_color(theme.table.row_even, degrees),
|
|
||||||
row_odd: rotate_color(theme.table.row_odd, degrees),
|
|
||||||
},
|
|
||||||
values: ValuesColors {
|
|
||||||
tempo: rotate_color(theme.values.tempo, degrees),
|
|
||||||
value: rotate_color(theme.values.value, degrees),
|
|
||||||
},
|
|
||||||
hint: HintColors {
|
|
||||||
key: rotate_color(theme.hint.key, degrees),
|
|
||||||
text: rotate_color(theme.hint.text, degrees),
|
|
||||||
},
|
|
||||||
view_badge: ViewBadgeColors {
|
|
||||||
bg: rotate_color(theme.view_badge.bg, degrees),
|
|
||||||
fg: rotate_color(theme.view_badge.fg, degrees),
|
|
||||||
},
|
|
||||||
nav: NavColors {
|
|
||||||
selected_bg: rotate_color(theme.nav.selected_bg, degrees),
|
|
||||||
selected_fg: rotate_color(theme.nav.selected_fg, degrees),
|
|
||||||
unselected_bg: rotate_color(theme.nav.unselected_bg, degrees),
|
|
||||||
unselected_fg: rotate_color(theme.nav.unselected_fg, degrees),
|
|
||||||
},
|
|
||||||
editor_widget: EditorWidgetColors {
|
|
||||||
cursor_bg: rotate_color(theme.editor_widget.cursor_bg, degrees),
|
|
||||||
cursor_fg: rotate_color(theme.editor_widget.cursor_fg, degrees),
|
|
||||||
selection_bg: rotate_color(theme.editor_widget.selection_bg, degrees),
|
|
||||||
completion_bg: rotate_color(theme.editor_widget.completion_bg, degrees),
|
|
||||||
completion_fg: rotate_color(theme.editor_widget.completion_fg, degrees),
|
|
||||||
completion_selected: rotate_color(theme.editor_widget.completion_selected, degrees),
|
|
||||||
completion_example: rotate_color(theme.editor_widget.completion_example, degrees),
|
|
||||||
},
|
|
||||||
browser: BrowserColors {
|
|
||||||
directory: rotate_color(theme.browser.directory, degrees),
|
|
||||||
project_file: rotate_color(theme.browser.project_file, degrees),
|
|
||||||
selected: rotate_color(theme.browser.selected, degrees),
|
|
||||||
file: rotate_color(theme.browser.file, degrees),
|
|
||||||
focused_border: rotate_color(theme.browser.focused_border, degrees),
|
|
||||||
unfocused_border: rotate_color(theme.browser.unfocused_border, degrees),
|
|
||||||
root: rotate_color(theme.browser.root, degrees),
|
|
||||||
file_icon: rotate_color(theme.browser.file_icon, degrees),
|
|
||||||
folder_icon: rotate_color(theme.browser.folder_icon, degrees),
|
|
||||||
empty_text: rotate_color(theme.browser.empty_text, degrees),
|
|
||||||
},
|
|
||||||
input: InputColors {
|
|
||||||
text: rotate_color(theme.input.text, degrees),
|
|
||||||
cursor: rotate_color(theme.input.cursor, degrees),
|
|
||||||
hint: rotate_color(theme.input.hint, degrees),
|
|
||||||
},
|
|
||||||
search: SearchColors {
|
|
||||||
active: rotate_color(theme.search.active, degrees),
|
|
||||||
inactive: rotate_color(theme.search.inactive, degrees),
|
|
||||||
match_bg: rotate_color(theme.search.match_bg, degrees),
|
|
||||||
match_fg: rotate_color(theme.search.match_fg, degrees),
|
|
||||||
},
|
|
||||||
markdown: MarkdownColors {
|
|
||||||
h1: rotate_color(theme.markdown.h1, degrees),
|
|
||||||
h2: rotate_color(theme.markdown.h2, degrees),
|
|
||||||
h3: rotate_color(theme.markdown.h3, degrees),
|
|
||||||
code: rotate_color(theme.markdown.code, degrees),
|
|
||||||
code_border: rotate_color(theme.markdown.code_border, degrees),
|
|
||||||
link: rotate_color(theme.markdown.link, degrees),
|
|
||||||
link_url: rotate_color(theme.markdown.link_url, degrees),
|
|
||||||
quote: rotate_color(theme.markdown.quote, degrees),
|
|
||||||
text: rotate_color(theme.markdown.text, degrees),
|
|
||||||
list: rotate_color(theme.markdown.list, degrees),
|
|
||||||
},
|
|
||||||
engine: EngineColors {
|
|
||||||
header: rotate_color(theme.engine.header, degrees),
|
|
||||||
header_focused: rotate_color(theme.engine.header_focused, degrees),
|
|
||||||
divider: rotate_color(theme.engine.divider, degrees),
|
|
||||||
scroll_indicator: rotate_color(theme.engine.scroll_indicator, degrees),
|
|
||||||
label: rotate_color(theme.engine.label, degrees),
|
|
||||||
label_focused: rotate_color(theme.engine.label_focused, degrees),
|
|
||||||
label_dim: rotate_color(theme.engine.label_dim, degrees),
|
|
||||||
value: rotate_color(theme.engine.value, degrees),
|
|
||||||
focused: rotate_color(theme.engine.focused, degrees),
|
|
||||||
normal: rotate_color(theme.engine.normal, degrees),
|
|
||||||
dim: rotate_color(theme.engine.dim, degrees),
|
|
||||||
path: rotate_color(theme.engine.path, degrees),
|
|
||||||
border_magenta: rotate_color(theme.engine.border_magenta, degrees),
|
|
||||||
border_green: rotate_color(theme.engine.border_green, degrees),
|
|
||||||
border_cyan: rotate_color(theme.engine.border_cyan, degrees),
|
|
||||||
separator: rotate_color(theme.engine.separator, degrees),
|
|
||||||
hint_active: rotate_color(theme.engine.hint_active, degrees),
|
|
||||||
hint_inactive: rotate_color(theme.engine.hint_inactive, degrees),
|
|
||||||
},
|
|
||||||
dict: DictColors {
|
|
||||||
word_name: rotate_color(theme.dict.word_name, degrees),
|
|
||||||
word_bg: rotate_color(theme.dict.word_bg, degrees),
|
|
||||||
alias: rotate_color(theme.dict.alias, degrees),
|
|
||||||
stack_sig: rotate_color(theme.dict.stack_sig, degrees),
|
|
||||||
description: rotate_color(theme.dict.description, degrees),
|
|
||||||
example: rotate_color(theme.dict.example, degrees),
|
|
||||||
category_focused: rotate_color(theme.dict.category_focused, degrees),
|
|
||||||
category_selected: rotate_color(theme.dict.category_selected, degrees),
|
|
||||||
category_normal: rotate_color(theme.dict.category_normal, degrees),
|
|
||||||
category_dimmed: rotate_color(theme.dict.category_dimmed, degrees),
|
|
||||||
border_focused: rotate_color(theme.dict.border_focused, degrees),
|
|
||||||
border_normal: rotate_color(theme.dict.border_normal, degrees),
|
|
||||||
header_desc: rotate_color(theme.dict.header_desc, degrees),
|
|
||||||
},
|
|
||||||
title: TitleColors {
|
|
||||||
big_title: rotate_color(theme.title.big_title, degrees),
|
|
||||||
author: rotate_color(theme.title.author, degrees),
|
|
||||||
link: rotate_color(theme.title.link, degrees),
|
|
||||||
license: rotate_color(theme.title.license, degrees),
|
|
||||||
prompt: rotate_color(theme.title.prompt, degrees),
|
|
||||||
subtitle: rotate_color(theme.title.subtitle, degrees),
|
|
||||||
},
|
|
||||||
meter: MeterColors {
|
|
||||||
low: rotate_color(theme.meter.low, degrees),
|
|
||||||
mid: rotate_color(theme.meter.mid, degrees),
|
|
||||||
high: rotate_color(theme.meter.high, degrees),
|
|
||||||
low_rgb: rotate_tuple(theme.meter.low_rgb, degrees),
|
|
||||||
mid_rgb: rotate_tuple(theme.meter.mid_rgb, degrees),
|
|
||||||
high_rgb: rotate_tuple(theme.meter.high_rgb, degrees),
|
|
||||||
},
|
|
||||||
sparkle: SparkleColors {
|
|
||||||
colors: [
|
|
||||||
rotate_tuple(theme.sparkle.colors[0], degrees),
|
|
||||||
rotate_tuple(theme.sparkle.colors[1], degrees),
|
|
||||||
rotate_tuple(theme.sparkle.colors[2], degrees),
|
|
||||||
rotate_tuple(theme.sparkle.colors[3], degrees),
|
|
||||||
rotate_tuple(theme.sparkle.colors[4], degrees),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
confirm: ConfirmColors {
|
|
||||||
border: rotate_color(theme.confirm.border, degrees),
|
|
||||||
button_selected_bg: rotate_color(theme.confirm.button_selected_bg, degrees),
|
|
||||||
button_selected_fg: rotate_color(theme.confirm.button_selected_fg, degrees),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
let d = degrees;
|
||||||
|
build(&Palette {
|
||||||
|
bg: rotate(palette.bg, d),
|
||||||
|
surface: rotate(palette.surface, d),
|
||||||
|
surface2: rotate(palette.surface2, d),
|
||||||
|
fg: rotate(palette.fg, d),
|
||||||
|
fg_dim: rotate(palette.fg_dim, d),
|
||||||
|
fg_muted: rotate(palette.fg_muted, d),
|
||||||
|
accent: rotate(palette.accent, d),
|
||||||
|
red: rotate(palette.red, d),
|
||||||
|
green: rotate(palette.green, d),
|
||||||
|
yellow: rotate(palette.yellow, d),
|
||||||
|
blue: rotate(palette.blue, d),
|
||||||
|
purple: rotate(palette.purple, d),
|
||||||
|
cyan: rotate(palette.cyan, d),
|
||||||
|
orange: rotate(palette.orange, d),
|
||||||
|
tempo_color: rotate(palette.tempo_color, d),
|
||||||
|
bank_color: rotate(palette.bank_color, d),
|
||||||
|
pattern_color: rotate(palette.pattern_color, d),
|
||||||
|
title_accent: rotate(palette.title_accent, d),
|
||||||
|
title_author: rotate(palette.title_author, d),
|
||||||
|
secondary: rotate(palette.secondary, d),
|
||||||
|
link_bright: rotate5(palette.link_bright, d),
|
||||||
|
link_dim: rotate5(palette.link_dim, d),
|
||||||
|
sparkle: rotate5(palette.sparkle, d),
|
||||||
|
meter: rotate3(palette.meter, d),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,14 +288,14 @@ impl App {
|
|||||||
}
|
}
|
||||||
AppCommand::SetColorScheme(scheme) => {
|
AppCommand::SetColorScheme(scheme) => {
|
||||||
self.ui.color_scheme = scheme;
|
self.ui.color_scheme = scheme;
|
||||||
let base_theme = scheme.to_theme();
|
let palette = scheme.to_palette();
|
||||||
let rotated = cagire_ratatui::theme::transform::rotate_theme(base_theme, self.ui.hue_rotation);
|
let rotated = cagire_ratatui::theme::transform::rotate_palette(&palette, self.ui.hue_rotation);
|
||||||
crate::theme::set(rotated);
|
crate::theme::set(rotated);
|
||||||
}
|
}
|
||||||
AppCommand::SetHueRotation(degrees) => {
|
AppCommand::SetHueRotation(degrees) => {
|
||||||
self.ui.hue_rotation = degrees;
|
self.ui.hue_rotation = degrees;
|
||||||
let base_theme = self.ui.color_scheme.to_theme();
|
let palette = self.ui.color_scheme.to_palette();
|
||||||
let rotated = cagire_ratatui::theme::transform::rotate_theme(base_theme, degrees);
|
let rotated = cagire_ratatui::theme::transform::rotate_palette(&palette, degrees);
|
||||||
crate::theme::set(rotated);
|
crate::theme::set(rotated);
|
||||||
}
|
}
|
||||||
AppCommand::ToggleRuntimeHighlight => {
|
AppCommand::ToggleRuntimeHighlight => {
|
||||||
|
|||||||
@@ -88,9 +88,9 @@ pub fn init(args: InitArgs) -> Init {
|
|||||||
app.audio.config.layout = settings.display.layout;
|
app.audio.config.layout = settings.display.layout;
|
||||||
app.ui.onboarding_dismissed = settings.display.onboarding_dismissed.clone();
|
app.ui.onboarding_dismissed = settings.display.onboarding_dismissed.clone();
|
||||||
|
|
||||||
let base_theme = settings.display.color_scheme.to_theme();
|
let palette = settings.display.color_scheme.to_palette();
|
||||||
let rotated =
|
let rotated =
|
||||||
cagire_ratatui::theme::transform::rotate_theme(base_theme, settings.display.hue_rotation);
|
cagire_ratatui::theme::transform::rotate_palette(&palette, settings.display.hue_rotation);
|
||||||
theme::set(rotated);
|
theme::set(rotated);
|
||||||
|
|
||||||
// MIDI connections
|
// MIDI connections
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
|
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
|
||||||
|
|
||||||
use crate::theme::{ThemeColors, THEMES};
|
use crate::theme::{palette::Palette, THEMES};
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
|
||||||
pub struct ColorScheme(usize);
|
pub struct ColorScheme(usize);
|
||||||
@@ -18,8 +18,8 @@ impl ColorScheme {
|
|||||||
Self((self.0 + THEMES.len() - 1) % THEMES.len())
|
Self((self.0 + THEMES.len() - 1) % THEMES.len())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn to_theme(self) -> ThemeColors {
|
pub fn to_palette(self) -> Palette {
|
||||||
(THEMES[self.0].colors)()
|
(THEMES[self.0].palette)()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user