Rework third-party themes (#3254)

This PR reworks the way we define our third-party themes to make them
work as overlays on top of a base theme.

We introduce the concept of a `UserThemeFamily` that contains
`UserTheme`s. Rather than being an entire theme definition on their own,
a `UserTheme` just contains optional overrides for the values in a
`Theme`.

When resolving a `UserTheme`, we apply it on top of the base theme. Any
values not overridden in the `UserTheme` will fall back to the `Theme`
defaults.

Right now we are just using `UserTheme` to model third-party themes that
we distribute with the Zed binary. However, this same structure can also
be used to import arbitrary user themes (such as from a theme registry,
or even a theme blob from the settings file).

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2023-11-07 17:40:07 +01:00 committed by GitHub
parent 9582a6f317
commit 0d95410634
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1389 additions and 6000 deletions

View file

@ -1,518 +1,131 @@
use gpui::rgba;
use crate::{
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
SyntaxTheme, SystemColors, Theme, ThemeColors, ThemeFamily, ThemeStyles,
Appearance, ThemeColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement,
};
pub fn ayu() -> ThemeFamily {
ThemeFamily {
id: "4faecf44-837e-4034-9197-7da909668498".into(),
pub fn ayu() -> UserThemeFamily {
UserThemeFamily {
name: "Ayu".into(),
author: "dempfi (Ike Ku)".into(),
themes: vec![
Theme {
id: "733aeb9b-98fd-4492-984e-d71540daf72e".into(),
UserTheme {
name: "Ayu Light".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(0x6b7d8f1f).into(),
border_variant: rgba(0x6b7d8f1f).into(),
border_focused: rgba(0x6b7d8f1f).into(),
border_selected: rgba(0x6b7d8f1f).into(),
border_transparent: rgba(0x6b7d8f1f).into(),
border_disabled: rgba(0x6b7d8f1f).into(),
elevated_surface_background: rgba(0xf8f9faff).into(),
surface_background: rgba(0xf8f9faff).into(),
background: rgba(0xf8f9faff).into(),
element_background: rgba(0xffaa32ff).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(0x8a9199ff).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(0xf8f9faff).into(),
tab_active_background: rgba(0xf8f9faff).into(),
editor_background: rgba(0xfcfcfdff).into(),
editor_gutter_background: rgba(0xfcfcfdff).into(),
editor_subheader_background: rgba(0xf9f9fbff).into(),
editor_active_line_background: rgba(0x0000320f).into(),
editor_highlighted_line_background: rgba(0x00002c17).into(),
editor_line_number: rgba(0x0000320f).into(),
editor_active_line_number: rgba(0x0000320f).into(),
editor_invisible: rgba(0x00002c17).into(),
editor_wrap_guide: rgba(0x00002c17).into(),
editor_active_wrap_guide: rgba(0x00002c17).into(),
editor_document_highlight_read_background: rgba(0x00002c17).into(),
editor_document_highlight_write_background: rgba(0x00002c17).into(),
terminal_background: rgba(0xf8f9faff).into(),
terminal_ansi_bright_black: rgba(0x686868ff).into(),
terminal_ansi_bright_red: rgba(0xef7070ff).into(),
terminal_ansi_bright_green: rgba(0x86b300ff).into(),
terminal_ansi_bright_yellow: rgba(0xf2ad48ff).into(),
terminal_ansi_bright_blue: rgba(0x389ee6ff).into(),
terminal_ansi_bright_magenta: rgba(0xa37accff).into(),
terminal_ansi_bright_cyan: rgba(0x4bbf98ff).into(),
terminal_ansi_bright_white: rgba(0xd1d1d1ff).into(),
terminal_ansi_black: rgba(0x000000ff).into(),
terminal_ansi_red: rgba(0xea6c6dff).into(),
terminal_ansi_green: rgba(0x6cbf43ff).into(),
terminal_ansi_yellow: rgba(0xeca944ff).into(),
terminal_ansi_blue: rgba(0x3198e1ff).into(),
terminal_ansi_magenta: rgba(0x9e75c7ff).into(),
terminal_ansi_cyan: rgba(0x46ba94ff).into(),
terminal_ansi_white: rgba(0xc7c7c7ff).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(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).into(),
},
PlayerColor {
cursor: rgba(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).into(),
},
PlayerColor {
cursor: rgba(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).into(),
},
PlayerColor {
cursor: rgba(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).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()),
],
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border: Some(rgba(0x6b7d8f1f).into()),
border_variant: Some(rgba(0x6b7d8f1f).into()),
border_focused: Some(rgba(0x6b7d8f1f).into()),
border_selected: Some(rgba(0x6b7d8f1f).into()),
border_transparent: Some(rgba(0x6b7d8f1f).into()),
border_disabled: Some(rgba(0x6b7d8f1f).into()),
elevated_surface_background: Some(rgba(0xf8f9faff).into()),
surface_background: Some(rgba(0xf8f9faff).into()),
background: Some(rgba(0xf8f9faff).into()),
element_background: Some(rgba(0xffaa32ff).into()),
text: Some(rgba(0x8a9199ff).into()),
tab_inactive_background: Some(rgba(0xf8f9faff).into()),
tab_active_background: Some(rgba(0xf8f9faff).into()),
terminal_background: Some(rgba(0xf8f9faff).into()),
terminal_ansi_bright_black: Some(rgba(0x686868ff).into()),
terminal_ansi_bright_red: Some(rgba(0xef7070ff).into()),
terminal_ansi_bright_green: Some(rgba(0x86b300ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xf2ad48ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x389ee6ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xa37accff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x4bbf98ff).into()),
terminal_ansi_bright_white: Some(rgba(0xd1d1d1ff).into()),
terminal_ansi_black: Some(rgba(0x000000ff).into()),
terminal_ansi_red: Some(rgba(0xea6c6dff).into()),
terminal_ansi_green: Some(rgba(0x6cbf43ff).into()),
terminal_ansi_yellow: Some(rgba(0xeca944ff).into()),
terminal_ansi_blue: Some(rgba(0x3198e1ff).into()),
terminal_ansi_magenta: Some(rgba(0x9e75c7ff).into()),
terminal_ansi_cyan: Some(rgba(0x46ba94ff).into()),
terminal_ansi_white: Some(rgba(0xc7c7c7ff).into()),
..Default::default()
},
},
},
Theme {
id: "50f68427-2e1d-4bf1-981a-d08c6b38e846".into(),
UserTheme {
name: "Ayu Mirage".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(0x171a24ff).into(),
border_variant: rgba(0x171a24ff).into(),
border_focused: rgba(0x171a24ff).into(),
border_selected: rgba(0x171a24ff).into(),
border_transparent: rgba(0x171a24ff).into(),
border_disabled: rgba(0x171a24ff).into(),
elevated_surface_background: rgba(0x1f2430ff).into(),
surface_background: rgba(0x1f2430ff).into(),
background: rgba(0x1f2430ff).into(),
element_background: rgba(0xffcb65ff).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(0x707a8cff).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(0x1f2430ff).into(),
tab_active_background: rgba(0x1f2430ff).into(),
editor_background: rgba(0x111113ff).into(),
editor_gutter_background: rgba(0x111113ff).into(),
editor_subheader_background: rgba(0x18191bff).into(),
editor_active_line_background: rgba(0xddeaf814).into(),
editor_highlighted_line_background: rgba(0xd3edf81d).into(),
editor_line_number: rgba(0xddeaf814).into(),
editor_active_line_number: rgba(0xddeaf814).into(),
editor_invisible: rgba(0xd3edf81d).into(),
editor_wrap_guide: rgba(0xd3edf81d).into(),
editor_active_wrap_guide: rgba(0xd3edf81d).into(),
editor_document_highlight_read_background: rgba(0xd3edf81d).into(),
editor_document_highlight_write_background: rgba(0xd3edf81d).into(),
terminal_background: rgba(0x1f2430ff).into(),
terminal_ansi_bright_black: rgba(0x686868ff).into(),
terminal_ansi_bright_red: rgba(0xf18678ff).into(),
terminal_ansi_bright_green: rgba(0xd4fe7fff).into(),
terminal_ansi_bright_yellow: rgba(0xffd173ff).into(),
terminal_ansi_bright_blue: rgba(0x73cfffff).into(),
terminal_ansi_bright_magenta: rgba(0xdfbfffff).into(),
terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(),
terminal_ansi_bright_white: rgba(0xffffffff).into(),
terminal_ansi_black: rgba(0x171a24ff).into(),
terminal_ansi_red: rgba(0xed8173ff).into(),
terminal_ansi_green: rgba(0x86d96bff).into(),
terminal_ansi_yellow: rgba(0xfacc6eff).into(),
terminal_ansi_blue: rgba(0x6ccafaff).into(),
terminal_ansi_magenta: rgba(0xdabafaff).into(),
terminal_ansi_cyan: rgba(0x90e1c6ff).into(),
terminal_ansi_white: rgba(0xc7c7c7ff).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(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).into(),
},
PlayerColor {
cursor: rgba(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).into(),
},
PlayerColor {
cursor: rgba(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).into(),
},
PlayerColor {
cursor: rgba(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).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()),
],
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border: Some(rgba(0x171a24ff).into()),
border_variant: Some(rgba(0x171a24ff).into()),
border_focused: Some(rgba(0x171a24ff).into()),
border_selected: Some(rgba(0x171a24ff).into()),
border_transparent: Some(rgba(0x171a24ff).into()),
border_disabled: Some(rgba(0x171a24ff).into()),
elevated_surface_background: Some(rgba(0x1f2430ff).into()),
surface_background: Some(rgba(0x1f2430ff).into()),
background: Some(rgba(0x1f2430ff).into()),
element_background: Some(rgba(0xffcb65ff).into()),
text: Some(rgba(0x707a8cff).into()),
tab_inactive_background: Some(rgba(0x1f2430ff).into()),
tab_active_background: Some(rgba(0x1f2430ff).into()),
terminal_background: Some(rgba(0x1f2430ff).into()),
terminal_ansi_bright_black: Some(rgba(0x686868ff).into()),
terminal_ansi_bright_red: Some(rgba(0xf18678ff).into()),
terminal_ansi_bright_green: Some(rgba(0xd4fe7fff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xffd173ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x73cfffff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xdfbfffff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x95e6cbff).into()),
terminal_ansi_bright_white: Some(rgba(0xffffffff).into()),
terminal_ansi_black: Some(rgba(0x171a24ff).into()),
terminal_ansi_red: Some(rgba(0xed8173ff).into()),
terminal_ansi_green: Some(rgba(0x86d96bff).into()),
terminal_ansi_yellow: Some(rgba(0xfacc6eff).into()),
terminal_ansi_blue: Some(rgba(0x6ccafaff).into()),
terminal_ansi_magenta: Some(rgba(0xdabafaff).into()),
terminal_ansi_cyan: Some(rgba(0x90e1c6ff).into()),
terminal_ansi_white: Some(rgba(0xc7c7c7ff).into()),
..Default::default()
},
},
},
Theme {
id: "22d8dede-57da-46e1-946a-16876679b4d2".into(),
UserTheme {
name: "Ayu Dark".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(0x1e232bff).into(),
border_variant: rgba(0x1e232bff).into(),
border_focused: rgba(0x1e232bff).into(),
border_selected: rgba(0x1e232bff).into(),
border_transparent: rgba(0x1e232bff).into(),
border_disabled: rgba(0x1e232bff).into(),
elevated_surface_background: rgba(0x0b0e14ff).into(),
surface_background: rgba(0x0b0e14ff).into(),
background: rgba(0x0b0e14ff).into(),
element_background: rgba(0xe6b450ff).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(0x565b66ff).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(0x0b0e14ff).into(),
tab_active_background: rgba(0x0b0e14ff).into(),
editor_background: rgba(0x111113ff).into(),
editor_gutter_background: rgba(0x111113ff).into(),
editor_subheader_background: rgba(0x18191bff).into(),
editor_active_line_background: rgba(0xddeaf814).into(),
editor_highlighted_line_background: rgba(0xd3edf81d).into(),
editor_line_number: rgba(0xddeaf814).into(),
editor_active_line_number: rgba(0xddeaf814).into(),
editor_invisible: rgba(0xd3edf81d).into(),
editor_wrap_guide: rgba(0xd3edf81d).into(),
editor_active_wrap_guide: rgba(0xd3edf81d).into(),
editor_document_highlight_read_background: rgba(0xd3edf81d).into(),
editor_document_highlight_write_background: rgba(0xd3edf81d).into(),
terminal_background: rgba(0x0b0e14ff).into(),
terminal_ansi_bright_black: rgba(0x686868ff).into(),
terminal_ansi_bright_red: rgba(0xef7077ff).into(),
terminal_ansi_bright_green: rgba(0xa9d94bff).into(),
terminal_ansi_bright_yellow: rgba(0xffb353ff).into(),
terminal_ansi_bright_blue: rgba(0x59c2ffff).into(),
terminal_ansi_bright_magenta: rgba(0xd2a6ffff).into(),
terminal_ansi_bright_cyan: rgba(0x95e6cbff).into(),
terminal_ansi_bright_white: rgba(0xffffffff).into(),
terminal_ansi_black: rgba(0x1e232bff).into(),
terminal_ansi_red: rgba(0xea6c72ff).into(),
terminal_ansi_green: rgba(0x7ed962ff).into(),
terminal_ansi_yellow: rgba(0xf9af4fff).into(),
terminal_ansi_blue: rgba(0x52bdfaff).into(),
terminal_ansi_magenta: rgba(0xcca1faff).into(),
terminal_ansi_cyan: rgba(0x90e1c6ff).into(),
terminal_ansi_white: rgba(0xc7c7c7ff).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(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).into(),
},
PlayerColor {
cursor: rgba(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).into(),
},
PlayerColor {
cursor: rgba(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).into(),
},
PlayerColor {
cursor: rgba(0x000000ff).into(),
background: rgba(0x000000ff).into(),
selection: rgba(0x000000ff).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()),
],
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border: Some(rgba(0x1e232bff).into()),
border_variant: Some(rgba(0x1e232bff).into()),
border_focused: Some(rgba(0x1e232bff).into()),
border_selected: Some(rgba(0x1e232bff).into()),
border_transparent: Some(rgba(0x1e232bff).into()),
border_disabled: Some(rgba(0x1e232bff).into()),
elevated_surface_background: Some(rgba(0x0b0e14ff).into()),
surface_background: Some(rgba(0x0b0e14ff).into()),
background: Some(rgba(0x0b0e14ff).into()),
element_background: Some(rgba(0xe6b450ff).into()),
text: Some(rgba(0x565b66ff).into()),
tab_inactive_background: Some(rgba(0x0b0e14ff).into()),
tab_active_background: Some(rgba(0x0b0e14ff).into()),
terminal_background: Some(rgba(0x0b0e14ff).into()),
terminal_ansi_bright_black: Some(rgba(0x686868ff).into()),
terminal_ansi_bright_red: Some(rgba(0xef7077ff).into()),
terminal_ansi_bright_green: Some(rgba(0xa9d94bff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xffb353ff).into()),
terminal_ansi_bright_blue: Some(rgba(0x59c2ffff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xd2a6ffff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x95e6cbff).into()),
terminal_ansi_bright_white: Some(rgba(0xffffffff).into()),
terminal_ansi_black: Some(rgba(0x1e232bff).into()),
terminal_ansi_red: Some(rgba(0xea6c72ff).into()),
terminal_ansi_green: Some(rgba(0x7ed962ff).into()),
terminal_ansi_yellow: Some(rgba(0xf9af4fff).into()),
terminal_ansi_blue: Some(rgba(0x52bdfaff).into()),
terminal_ansi_magenta: Some(rgba(0xcca1faff).into()),
terminal_ansi_cyan: Some(rgba(0x90e1c6ff).into()),
terminal_ansi_white: Some(rgba(0xc7c7c7ff).into()),
..Default::default()
},
},
},
],
scales: default_color_scales(),
}
}