ZIm/crates/theme2/src/themes/rose_pine.rs
2023-11-06 15:24:36 -05:00

491 lines
30 KiB
Rust

use gpui::rgba;
use crate::{
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
};
pub fn rose_pine() -> ThemeFamily {
ThemeFamily {
id: "48c308b9-7dbe-4a52-b935-0b44d9dac00d".into(),
name: "Rose Pine".into(),
author: "Rosé Pine".into(),
themes: vec![
ThemeVariant {
id: "c2832e85-20cb-4a13-924f-026e68123068".into(),
name: "Rose Pine".into(),
appearance: Appearance::Dark,
styles: ThemeStyles {
system: SystemColors {
transparent: rgba(0x00000000).into(),
mac_os_traffic_light_red: rgba(0xec6b5fff).into(),
mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(),
mac_os_traffic_light_green: rgba(0x61c454ff).into(),
},
colors: ThemeColors {
border: rgba(0x000000ff).into(),
border_variant: rgba(0x000000ff).into(),
border_focused: rgba(0x000000ff).into(),
border_disabled: rgba(0x000000ff).into(),
border_selected: rgba(0x000000ff).into(),
border_transparent: rgba(0x000000ff).into(),
elevated_surface_background: rgba(0x1f1d2eff).into(),
surface_background: rgba(0x1f1d2eff).into(),
background: rgba(0x191724ff).into(),
element_background: rgba(0xebbcbaff).into(),
element_hover: rgba(0x272a2dff).into(),
element_active: rgba(0x2e3135ff).into(),
element_selected: rgba(0x2e3135ff).into(),
element_disabled: rgba(0xddeaf814).into(),
element_placeholder: rgba(0xb0b4baff).into(),
element_drop_target: rgba(0x1166fb18).into(),
ghost_element_background: rgba(0x00000000).into(),
ghost_element_hover: rgba(0x272a2dff).into(),
ghost_element_active: rgba(0x2e3135ff).into(),
ghost_element_selected: rgba(0x2e3135ff).into(),
ghost_element_disabled: rgba(0xddeaf814).into(),
text: rgba(0xe0def4ff).into(),
text_muted: rgba(0xb0b4baff).into(),
text_placeholder: rgba(0x767a83ff).into(),
text_disabled: rgba(0x696e77ff).into(),
text_accent: rgba(0x6fb8ffff).into(),
icon: rgba(0xb0b4baff).into(),
icon_muted: rgba(0x767a83ff).into(),
icon_disabled: rgba(0x696e77ff).into(),
icon_placeholder: rgba(0x767a83ff).into(),
icon_accent: rgba(0x6fb8ffff).into(),
status_bar_background: rgba(0x18191bff).into(),
title_bar_background: rgba(0x18191bff).into(),
toolbar_background: rgba(0x111113ff).into(),
tab_bar_background: rgba(0x18191bff).into(),
tab_inactive_background: rgba(0x000000ff).into(),
tab_active_background: rgba(0x6e6a861a).into(),
editor_background: rgba(0x111113ff).into(),
editor_subheader_background: rgba(0x18191bff).into(),
editor_active_line: rgba(0xddeaf814).into(),
terminal_background: rgba(0x111113ff).into(),
terminal_ansi_bright_black: rgba(0x908caaff).into(),
terminal_ansi_bright_red: rgba(0xeb6f92ff).into(),
terminal_ansi_bright_green: rgba(0x30738fff).into(),
terminal_ansi_bright_yellow: rgba(0xf5c177ff).into(),
terminal_ansi_bright_blue: rgba(0x9ccfd8ff).into(),
terminal_ansi_bright_magenta: rgba(0xc4a7e7ff).into(),
terminal_ansi_bright_cyan: rgba(0xebbcbaff).into(),
terminal_ansi_bright_white: rgba(0xe0def4ff).into(),
terminal_ansi_black: rgba(0x26233aff).into(),
terminal_ansi_red: rgba(0xeb6f92ff).into(),
terminal_ansi_green: rgba(0x30738fff).into(),
terminal_ansi_yellow: rgba(0xf5c177ff).into(),
terminal_ansi_blue: rgba(0x9ccfd8ff).into(),
terminal_ansi_magenta: rgba(0xc4a7e7ff).into(),
terminal_ansi_cyan: rgba(0xebbcbaff).into(),
terminal_ansi_white: rgba(0xe0def4ff).into(),
},
status: StatusColors {
conflict: rgba(0xff9592ff).into(),
created: rgba(0x70cf82ff).into(),
deleted: rgba(0xff9592ff).into(),
error: rgba(0xff9592ff).into(),
hidden: rgba(0xb0b4baff).into(),
ignored: rgba(0xb0b4baff).into(),
info: rgba(0x6fb8ffff).into(),
modified: rgba(0xf5e147ff).into(),
renamed: rgba(0x6fb8ffff).into(),
success: rgba(0x70cf82ff).into(),
warning: rgba(0xf5e147ff).into(),
},
git: GitStatusColors {
conflict: rgba(0xffa057ff).into(),
created: rgba(0x70cf82ff).into(),
deleted: rgba(0xff9592ff).into(),
ignored: rgba(0xb0b4baff).into(),
modified: rgba(0xf5e147ff).into(),
renamed: rgba(0x6fb8ffff).into(),
},
player: PlayerColors(vec![
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
]),
syntax: SyntaxTheme {
highlights: vec![
("attribute".into(), rgba(0x4ccce6ff).into()),
("boolean".into(), rgba(0xff977dff).into()),
("comment".into(), rgba(0xb0b4baff).into()),
("comment.doc".into(), rgba(0xe0dffeff).into()),
("constant".into(), rgba(0x8c323aff).into()),
("constructor".into(), rgba(0x8c323aff).into()),
("embedded".into(), rgba(0x8c323aff).into()),
("emphasis".into(), rgba(0x8c323aff).into()),
("emphasis.strong".into(), rgba(0x8c323aff).into()),
("enum".into(), rgba(0x8c323aff).into()),
("function".into(), rgba(0x8c323aff).into()),
("hint".into(), rgba(0x8c323aff).into()),
("keyword".into(), rgba(0xffa057ff).into()),
("label".into(), rgba(0x8c323aff).into()),
("link_text".into(), rgba(0x8c323aff).into()),
("link_uri".into(), rgba(0x8c323aff).into()),
("number".into(), rgba(0x8c323aff).into()),
("operator".into(), rgba(0x8c323aff).into()),
("predictive".into(), rgba(0x8c323aff).into()),
("preproc".into(), rgba(0x8c323aff).into()),
("primary".into(), rgba(0x8c323aff).into()),
("property".into(), rgba(0x8c323aff).into()),
("punctuation".into(), rgba(0xb0b4baff).into()),
("punctuation.bracket".into(), rgba(0xb0b4baff).into()),
("punctuation.delimiter".into(), rgba(0xb0b4baff).into()),
("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()),
("punctuation.special".into(), rgba(0x8c323aff).into()),
("string".into(), rgba(0x1ed8a3ff).into()),
("string.escape".into(), rgba(0x8c323aff).into()),
("string.regex".into(), rgba(0xff977dff).into()),
("string.special".into(), rgba(0x8c323aff).into()),
("string.special.symbol".into(), rgba(0x8c323aff).into()),
("tag".into(), rgba(0x8c323aff).into()),
("text.literal".into(), rgba(0x8c323aff).into()),
("title".into(), rgba(0x8c323aff).into()),
("type".into(), rgba(0x8c323aff).into()),
("variable".into(), rgba(0x8c323aff).into()),
("variable.special".into(), rgba(0x8c323aff).into()),
("variant".into(), rgba(0x8c323aff).into()),
],
},
},
},
ThemeVariant {
id: "3f6c3263-86f4-4a0e-92a6-144984aa2d38".into(),
name: "Rose Moon".into(),
appearance: Appearance::Dark,
styles: ThemeStyles {
system: SystemColors {
transparent: rgba(0x00000000).into(),
mac_os_traffic_light_red: rgba(0xec6b5fff).into(),
mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(),
mac_os_traffic_light_green: rgba(0x61c454ff).into(),
},
colors: ThemeColors {
border: rgba(0x000000ff).into(),
border_variant: rgba(0x000000ff).into(),
border_focused: rgba(0x000000ff).into(),
border_disabled: rgba(0x000000ff).into(),
border_selected: rgba(0x000000ff).into(),
border_transparent: rgba(0x000000ff).into(),
elevated_surface_background: rgba(0x2a273eff).into(),
surface_background: rgba(0x2a273eff).into(),
background: rgba(0x232136ff).into(),
element_background: rgba(0xea9a97ff).into(),
element_hover: rgba(0x272a2dff).into(),
element_active: rgba(0x2e3135ff).into(),
element_selected: rgba(0x2e3135ff).into(),
element_disabled: rgba(0xddeaf814).into(),
element_placeholder: rgba(0xb0b4baff).into(),
element_drop_target: rgba(0x1166fb18).into(),
ghost_element_background: rgba(0x00000000).into(),
ghost_element_hover: rgba(0x272a2dff).into(),
ghost_element_active: rgba(0x2e3135ff).into(),
ghost_element_selected: rgba(0x2e3135ff).into(),
ghost_element_disabled: rgba(0xddeaf814).into(),
text: rgba(0xe0def4ff).into(),
text_muted: rgba(0xb0b4baff).into(),
text_placeholder: rgba(0x767a83ff).into(),
text_disabled: rgba(0x696e77ff).into(),
text_accent: rgba(0x6fb8ffff).into(),
icon: rgba(0xb0b4baff).into(),
icon_muted: rgba(0x767a83ff).into(),
icon_disabled: rgba(0x696e77ff).into(),
icon_placeholder: rgba(0x767a83ff).into(),
icon_accent: rgba(0x6fb8ffff).into(),
status_bar_background: rgba(0x18191bff).into(),
title_bar_background: rgba(0x18191bff).into(),
toolbar_background: rgba(0x111113ff).into(),
tab_bar_background: rgba(0x18191bff).into(),
tab_inactive_background: rgba(0x000000ff).into(),
tab_active_background: rgba(0x817c9c14).into(),
editor_background: rgba(0x111113ff).into(),
editor_subheader_background: rgba(0x18191bff).into(),
editor_active_line: rgba(0xddeaf814).into(),
terminal_background: rgba(0x111113ff).into(),
terminal_ansi_bright_black: rgba(0x908caaff).into(),
terminal_ansi_bright_red: rgba(0xeb6f92ff).into(),
terminal_ansi_bright_green: rgba(0x3d8fb0ff).into(),
terminal_ansi_bright_yellow: rgba(0xf5c177ff).into(),
terminal_ansi_bright_blue: rgba(0x9ccfd8ff).into(),
terminal_ansi_bright_magenta: rgba(0xc4a7e7ff).into(),
terminal_ansi_bright_cyan: rgba(0xea9a97ff).into(),
terminal_ansi_bright_white: rgba(0xe0def4ff).into(),
terminal_ansi_black: rgba(0x393552ff).into(),
terminal_ansi_red: rgba(0xeb6f92ff).into(),
terminal_ansi_green: rgba(0x3d8fb0ff).into(),
terminal_ansi_yellow: rgba(0xf5c177ff).into(),
terminal_ansi_blue: rgba(0x9ccfd8ff).into(),
terminal_ansi_magenta: rgba(0xc4a7e7ff).into(),
terminal_ansi_cyan: rgba(0xea9a97ff).into(),
terminal_ansi_white: rgba(0xe0def4ff).into(),
},
status: StatusColors {
conflict: rgba(0xff9592ff).into(),
created: rgba(0x70cf82ff).into(),
deleted: rgba(0xff9592ff).into(),
error: rgba(0xff9592ff).into(),
hidden: rgba(0xb0b4baff).into(),
ignored: rgba(0xb0b4baff).into(),
info: rgba(0x6fb8ffff).into(),
modified: rgba(0xf5e147ff).into(),
renamed: rgba(0x6fb8ffff).into(),
success: rgba(0x70cf82ff).into(),
warning: rgba(0xf5e147ff).into(),
},
git: GitStatusColors {
conflict: rgba(0xffa057ff).into(),
created: rgba(0x70cf82ff).into(),
deleted: rgba(0xff9592ff).into(),
ignored: rgba(0xb0b4baff).into(),
modified: rgba(0xf5e147ff).into(),
renamed: rgba(0x6fb8ffff).into(),
},
player: PlayerColors(vec![
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
]),
syntax: SyntaxTheme {
highlights: vec![
("attribute".into(), rgba(0x4ccce6ff).into()),
("boolean".into(), rgba(0xff977dff).into()),
("comment".into(), rgba(0xb0b4baff).into()),
("comment.doc".into(), rgba(0xe0dffeff).into()),
("constant".into(), rgba(0x8c323aff).into()),
("constructor".into(), rgba(0x8c323aff).into()),
("embedded".into(), rgba(0x8c323aff).into()),
("emphasis".into(), rgba(0x8c323aff).into()),
("emphasis.strong".into(), rgba(0x8c323aff).into()),
("enum".into(), rgba(0x8c323aff).into()),
("function".into(), rgba(0x8c323aff).into()),
("hint".into(), rgba(0x8c323aff).into()),
("keyword".into(), rgba(0xffa057ff).into()),
("label".into(), rgba(0x8c323aff).into()),
("link_text".into(), rgba(0x8c323aff).into()),
("link_uri".into(), rgba(0x8c323aff).into()),
("number".into(), rgba(0x8c323aff).into()),
("operator".into(), rgba(0x8c323aff).into()),
("predictive".into(), rgba(0x8c323aff).into()),
("preproc".into(), rgba(0x8c323aff).into()),
("primary".into(), rgba(0x8c323aff).into()),
("property".into(), rgba(0x8c323aff).into()),
("punctuation".into(), rgba(0xb0b4baff).into()),
("punctuation.bracket".into(), rgba(0xb0b4baff).into()),
("punctuation.delimiter".into(), rgba(0xb0b4baff).into()),
("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()),
("punctuation.special".into(), rgba(0x8c323aff).into()),
("string".into(), rgba(0x1ed8a3ff).into()),
("string.escape".into(), rgba(0x8c323aff).into()),
("string.regex".into(), rgba(0xff977dff).into()),
("string.special".into(), rgba(0x8c323aff).into()),
("string.special.symbol".into(), rgba(0x8c323aff).into()),
("tag".into(), rgba(0x8c323aff).into()),
("text.literal".into(), rgba(0x8c323aff).into()),
("title".into(), rgba(0x8c323aff).into()),
("type".into(), rgba(0x8c323aff).into()),
("variable".into(), rgba(0x8c323aff).into()),
("variable.special".into(), rgba(0x8c323aff).into()),
("variant".into(), rgba(0x8c323aff).into()),
],
},
},
},
ThemeVariant {
id: "d171cda6-de3b-4528-8559-cd8fb71b2e7c".into(),
name: "Rose Pine Dawn".into(),
appearance: Appearance::Light,
styles: ThemeStyles {
system: SystemColors {
transparent: rgba(0x00000000).into(),
mac_os_traffic_light_red: rgba(0xec6b5fff).into(),
mac_os_traffic_light_yellow: rgba(0xf3bf4dff).into(),
mac_os_traffic_light_green: rgba(0x61c454ff).into(),
},
colors: ThemeColors {
border: rgba(0x000000ff).into(),
border_variant: rgba(0x000000ff).into(),
border_focused: rgba(0x000000ff).into(),
border_disabled: rgba(0x000000ff).into(),
border_selected: rgba(0x000000ff).into(),
border_transparent: rgba(0x000000ff).into(),
elevated_surface_background: rgba(0xfffaf3ff).into(),
surface_background: rgba(0xfffaf3ff).into(),
background: rgba(0xfaf4edff).into(),
element_background: rgba(0xd7827dff).into(),
element_hover: rgba(0xe8e8ecff).into(),
element_active: rgba(0xe0e1e6ff).into(),
element_selected: rgba(0xe0e1e6ff).into(),
element_disabled: rgba(0x0000320f).into(),
element_placeholder: rgba(0x60646cff).into(),
element_drop_target: rgba(0x008bff0b).into(),
ghost_element_background: rgba(0x00000000).into(),
ghost_element_hover: rgba(0xe8e8ecff).into(),
ghost_element_active: rgba(0xe0e1e6ff).into(),
ghost_element_selected: rgba(0xe0e1e6ff).into(),
ghost_element_disabled: rgba(0x0000320f).into(),
text: rgba(0x575279ff).into(),
text_muted: rgba(0x60646cff).into(),
text_placeholder: rgba(0x80838dff).into(),
text_disabled: rgba(0x8b8d98ff).into(),
text_accent: rgba(0x0c73ceff).into(),
icon: rgba(0x60646cff).into(),
icon_muted: rgba(0x80838dff).into(),
icon_disabled: rgba(0x8b8d98ff).into(),
icon_placeholder: rgba(0x80838dff).into(),
icon_accent: rgba(0x0c73ceff).into(),
status_bar_background: rgba(0xf9f9fbff).into(),
title_bar_background: rgba(0xf9f9fbff).into(),
toolbar_background: rgba(0xfcfcfdff).into(),
tab_bar_background: rgba(0xf9f9fbff).into(),
tab_inactive_background: rgba(0x000000ff).into(),
tab_active_background: rgba(0x6e6a860d).into(),
editor_background: rgba(0xfcfcfdff).into(),
editor_subheader_background: rgba(0xf9f9fbff).into(),
editor_active_line: rgba(0x0000320f).into(),
terminal_background: rgba(0xfcfcfdff).into(),
terminal_ansi_bright_black: rgba(0x797593ff).into(),
terminal_ansi_bright_red: rgba(0xb3627aff).into(),
terminal_ansi_bright_green: rgba(0x276983ff).into(),
terminal_ansi_bright_yellow: rgba(0xea9d34ff).into(),
terminal_ansi_bright_blue: rgba(0x55949fff).into(),
terminal_ansi_bright_magenta: rgba(0x9079a9ff).into(),
terminal_ansi_bright_cyan: rgba(0xd7827dff).into(),
terminal_ansi_bright_white: rgba(0x575279ff).into(),
terminal_ansi_black: rgba(0xf2e9e1ff).into(),
terminal_ansi_red: rgba(0xb3627aff).into(),
terminal_ansi_green: rgba(0x276983ff).into(),
terminal_ansi_yellow: rgba(0xea9d34ff).into(),
terminal_ansi_blue: rgba(0x55949fff).into(),
terminal_ansi_magenta: rgba(0x9079a9ff).into(),
terminal_ansi_cyan: rgba(0xd7827dff).into(),
terminal_ansi_white: rgba(0x575279ff).into(),
},
status: StatusColors {
conflict: rgba(0xff9592ff).into(),
created: rgba(0x70cf82ff).into(),
deleted: rgba(0xff9592ff).into(),
error: rgba(0xff9592ff).into(),
hidden: rgba(0xb0b4baff).into(),
ignored: rgba(0xb0b4baff).into(),
info: rgba(0x6fb8ffff).into(),
modified: rgba(0xf5e147ff).into(),
renamed: rgba(0x6fb8ffff).into(),
success: rgba(0x70cf82ff).into(),
warning: rgba(0xf5e147ff).into(),
},
git: GitStatusColors {
conflict: rgba(0xffa057ff).into(),
created: rgba(0x70cf82ff).into(),
deleted: rgba(0xff9592ff).into(),
ignored: rgba(0xb0b4baff).into(),
modified: rgba(0xf5e147ff).into(),
renamed: rgba(0x6fb8ffff).into(),
},
player: PlayerColors(vec![
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
PlayerColor {
cursor: rgba(0x00000000).into(),
background: rgba(0x00000000).into(),
selection: rgba(0x00000000).into(),
},
]),
syntax: SyntaxTheme {
highlights: vec![
("attribute".into(), rgba(0x4ccce6ff).into()),
("boolean".into(), rgba(0xff977dff).into()),
("comment".into(), rgba(0xb0b4baff).into()),
("comment.doc".into(), rgba(0xe0dffeff).into()),
("constant".into(), rgba(0x8c323aff).into()),
("constructor".into(), rgba(0x8c323aff).into()),
("embedded".into(), rgba(0x8c323aff).into()),
("emphasis".into(), rgba(0x8c323aff).into()),
("emphasis.strong".into(), rgba(0x8c323aff).into()),
("enum".into(), rgba(0x8c323aff).into()),
("function".into(), rgba(0x8c323aff).into()),
("hint".into(), rgba(0x8c323aff).into()),
("keyword".into(), rgba(0xffa057ff).into()),
("label".into(), rgba(0x8c323aff).into()),
("link_text".into(), rgba(0x8c323aff).into()),
("link_uri".into(), rgba(0x8c323aff).into()),
("number".into(), rgba(0x8c323aff).into()),
("operator".into(), rgba(0x8c323aff).into()),
("predictive".into(), rgba(0x8c323aff).into()),
("preproc".into(), rgba(0x8c323aff).into()),
("primary".into(), rgba(0x8c323aff).into()),
("property".into(), rgba(0x8c323aff).into()),
("punctuation".into(), rgba(0xb0b4baff).into()),
("punctuation.bracket".into(), rgba(0xb0b4baff).into()),
("punctuation.delimiter".into(), rgba(0xb0b4baff).into()),
("punctuation.list_marker".into(), rgba(0x6fb8ffff).into()),
("punctuation.special".into(), rgba(0x8c323aff).into()),
("string".into(), rgba(0x1ed8a3ff).into()),
("string.escape".into(), rgba(0x8c323aff).into()),
("string.regex".into(), rgba(0xff977dff).into()),
("string.special".into(), rgba(0x8c323aff).into()),
("string.special.symbol".into(), rgba(0x8c323aff).into()),
("tag".into(), rgba(0x8c323aff).into()),
("text.literal".into(), rgba(0x8c323aff).into()),
("title".into(), rgba(0x8c323aff).into()),
("type".into(), rgba(0x8c323aff).into()),
("variable".into(), rgba(0x8c323aff).into()),
("variable.special".into(), rgba(0x8c323aff).into()),
("variant".into(), rgba(0x8c323aff).into()),
],
},
},
},
],
scales: default_color_scales(),
}
}