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,128 @@
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 palenight() -> ThemeFamily {
ThemeFamily {
id: "16313d66-dab6-468a-82f6-e69759fdd8cf".into(),
pub fn palenight() -> UserThemeFamily {
UserThemeFamily {
name: "Palenight".into(),
author: "Olaolu Olawuyi (whizkydee)".into(),
themes: vec![
Theme {
id: "39fdf216-2c76-4b3d-b368-7c31f479d524".into(),
UserTheme {
name: "Palenight".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(0x282b3bff).into(),
border_variant: rgba(0x282b3bff).into(),
border_focused: rgba(0x282b3bff).into(),
border_selected: rgba(0x282b3bff).into(),
border_transparent: rgba(0x282b3bff).into(),
border_disabled: rgba(0x282b3bff).into(),
elevated_surface_background: rgba(0x292c3eff).into(),
surface_background: rgba(0x292c3eff).into(),
background: rgba(0x292c3eff).into(),
element_background: rgba(0x7d56c1cc).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(0xffffffff).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(0x31364aff).into(),
tab_active_background: rgba(0x292c3eff).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(0x111113ff).into(),
terminal_ansi_bright_black: rgba(0x676e95ff).into(),
terminal_ansi_bright_red: rgba(0xff5571ff).into(),
terminal_ansi_bright_green: rgba(0xc3e88dff).into(),
terminal_ansi_bright_yellow: rgba(0xffcb6bff).into(),
terminal_ansi_bright_blue: rgba(0x82aaffff).into(),
terminal_ansi_bright_magenta: rgba(0xc792eaff).into(),
terminal_ansi_bright_cyan: rgba(0x89ddffff).into(),
terminal_ansi_bright_white: rgba(0xffffffff).into(),
terminal_ansi_black: rgba(0x676e95ff).into(),
terminal_ansi_red: rgba(0xff5571ff).into(),
terminal_ansi_green: rgba(0xa9c77dff).into(),
terminal_ansi_yellow: rgba(0xffcb6bff).into(),
terminal_ansi_blue: rgba(0x82aaffff).into(),
terminal_ansi_magenta: rgba(0xc792eaff).into(),
terminal_ansi_cyan: rgba(0x89ddffff).into(),
terminal_ansi_white: rgba(0xffffffff).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(0x282b3bff).into()),
border_variant: Some(rgba(0x282b3bff).into()),
border_focused: Some(rgba(0x282b3bff).into()),
border_selected: Some(rgba(0x282b3bff).into()),
border_transparent: Some(rgba(0x282b3bff).into()),
border_disabled: Some(rgba(0x282b3bff).into()),
elevated_surface_background: Some(rgba(0x292c3eff).into()),
surface_background: Some(rgba(0x292c3eff).into()),
background: Some(rgba(0x292c3eff).into()),
element_background: Some(rgba(0x7d56c1cc).into()),
text: Some(rgba(0xffffffff).into()),
tab_inactive_background: Some(rgba(0x31364aff).into()),
tab_active_background: Some(rgba(0x292c3eff).into()),
terminal_ansi_bright_black: Some(rgba(0x676e95ff).into()),
terminal_ansi_bright_red: Some(rgba(0xff5571ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc3e88dff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xffcb6bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xc792eaff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x89ddffff).into()),
terminal_ansi_bright_white: Some(rgba(0xffffffff).into()),
terminal_ansi_black: Some(rgba(0x676e95ff).into()),
terminal_ansi_red: Some(rgba(0xff5571ff).into()),
terminal_ansi_green: Some(rgba(0xa9c77dff).into()),
terminal_ansi_yellow: Some(rgba(0xffcb6bff).into()),
terminal_ansi_blue: Some(rgba(0x82aaffff).into()),
terminal_ansi_magenta: Some(rgba(0xc792eaff).into()),
terminal_ansi_cyan: Some(rgba(0x89ddffff).into()),
terminal_ansi_white: Some(rgba(0xffffffff).into()),
..Default::default()
},
},
},
Theme {
id: "5ff8120f-37e9-4ad3-8bd0-c3e449ff1aa1".into(),
UserTheme {
name: "Palenight Operator".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(0x282b3bff).into(),
border_variant: rgba(0x282b3bff).into(),
border_focused: rgba(0x282b3bff).into(),
border_selected: rgba(0x282b3bff).into(),
border_transparent: rgba(0x282b3bff).into(),
border_disabled: rgba(0x282b3bff).into(),
elevated_surface_background: rgba(0x292c3eff).into(),
surface_background: rgba(0x292c3eff).into(),
background: rgba(0x292c3eff).into(),
element_background: rgba(0x7d56c1cc).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(0xffffffff).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(0x31364aff).into(),
tab_active_background: rgba(0x292c3eff).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(0x111113ff).into(),
terminal_ansi_bright_black: rgba(0x676e95ff).into(),
terminal_ansi_bright_red: rgba(0xff5571ff).into(),
terminal_ansi_bright_green: rgba(0xc3e88dff).into(),
terminal_ansi_bright_yellow: rgba(0xffcb6bff).into(),
terminal_ansi_bright_blue: rgba(0x82aaffff).into(),
terminal_ansi_bright_magenta: rgba(0xc792eaff).into(),
terminal_ansi_bright_cyan: rgba(0x89ddffff).into(),
terminal_ansi_bright_white: rgba(0xffffffff).into(),
terminal_ansi_black: rgba(0x676e95ff).into(),
terminal_ansi_red: rgba(0xff5571ff).into(),
terminal_ansi_green: rgba(0xa9c77dff).into(),
terminal_ansi_yellow: rgba(0xffcb6bff).into(),
terminal_ansi_blue: rgba(0x82aaffff).into(),
terminal_ansi_magenta: rgba(0xc792eaff).into(),
terminal_ansi_cyan: rgba(0x89ddffff).into(),
terminal_ansi_white: rgba(0xffffffff).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(0x282b3bff).into()),
border_variant: Some(rgba(0x282b3bff).into()),
border_focused: Some(rgba(0x282b3bff).into()),
border_selected: Some(rgba(0x282b3bff).into()),
border_transparent: Some(rgba(0x282b3bff).into()),
border_disabled: Some(rgba(0x282b3bff).into()),
elevated_surface_background: Some(rgba(0x292c3eff).into()),
surface_background: Some(rgba(0x292c3eff).into()),
background: Some(rgba(0x292c3eff).into()),
element_background: Some(rgba(0x7d56c1cc).into()),
text: Some(rgba(0xffffffff).into()),
tab_inactive_background: Some(rgba(0x31364aff).into()),
tab_active_background: Some(rgba(0x292c3eff).into()),
terminal_ansi_bright_black: Some(rgba(0x676e95ff).into()),
terminal_ansi_bright_red: Some(rgba(0xff5571ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc3e88dff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xffcb6bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xc792eaff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x89ddffff).into()),
terminal_ansi_bright_white: Some(rgba(0xffffffff).into()),
terminal_ansi_black: Some(rgba(0x676e95ff).into()),
terminal_ansi_red: Some(rgba(0xff5571ff).into()),
terminal_ansi_green: Some(rgba(0xa9c77dff).into()),
terminal_ansi_yellow: Some(rgba(0xffcb6bff).into()),
terminal_ansi_blue: Some(rgba(0x82aaffff).into()),
terminal_ansi_magenta: Some(rgba(0xc792eaff).into()),
terminal_ansi_cyan: Some(rgba(0x89ddffff).into()),
terminal_ansi_white: Some(rgba(0xffffffff).into()),
..Default::default()
},
},
},
Theme {
id: "cff26efb-72f8-4496-b33b-991080a47f1c".into(),
UserTheme {
name: "Palenight (Mild Contrast)".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(0x2c2f40ff).into(),
border_variant: rgba(0x2c2f40ff).into(),
border_focused: rgba(0x2c2f40ff).into(),
border_selected: rgba(0x2c2f40ff).into(),
border_transparent: rgba(0x2c2f40ff).into(),
border_disabled: rgba(0x2c2f40ff).into(),
elevated_surface_background: rgba(0x25283aff).into(),
surface_background: rgba(0x25283aff).into(),
background: rgba(0x292c3eff).into(),
element_background: rgba(0x7d56c1cc).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(0xffffffff).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(0x31364aff).into(),
tab_active_background: rgba(0x25283aff).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(0x111113ff).into(),
terminal_ansi_bright_black: rgba(0x676e95ff).into(),
terminal_ansi_bright_red: rgba(0xff5571ff).into(),
terminal_ansi_bright_green: rgba(0xc3e88dff).into(),
terminal_ansi_bright_yellow: rgba(0xffcb6bff).into(),
terminal_ansi_bright_blue: rgba(0x82aaffff).into(),
terminal_ansi_bright_magenta: rgba(0xc792eaff).into(),
terminal_ansi_bright_cyan: rgba(0x89ddffff).into(),
terminal_ansi_bright_white: rgba(0xffffffff).into(),
terminal_ansi_black: rgba(0x676e95ff).into(),
terminal_ansi_red: rgba(0xff5571ff).into(),
terminal_ansi_green: rgba(0xa9c77dff).into(),
terminal_ansi_yellow: rgba(0xffcb6bff).into(),
terminal_ansi_blue: rgba(0x82aaffff).into(),
terminal_ansi_magenta: rgba(0xc792eaff).into(),
terminal_ansi_cyan: rgba(0x89ddffff).into(),
terminal_ansi_white: rgba(0xffffffff).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(0x2c2f40ff).into()),
border_variant: Some(rgba(0x2c2f40ff).into()),
border_focused: Some(rgba(0x2c2f40ff).into()),
border_selected: Some(rgba(0x2c2f40ff).into()),
border_transparent: Some(rgba(0x2c2f40ff).into()),
border_disabled: Some(rgba(0x2c2f40ff).into()),
elevated_surface_background: Some(rgba(0x25283aff).into()),
surface_background: Some(rgba(0x25283aff).into()),
background: Some(rgba(0x292c3eff).into()),
element_background: Some(rgba(0x7d56c1cc).into()),
text: Some(rgba(0xffffffff).into()),
tab_inactive_background: Some(rgba(0x31364aff).into()),
tab_active_background: Some(rgba(0x25283aff).into()),
terminal_ansi_bright_black: Some(rgba(0x676e95ff).into()),
terminal_ansi_bright_red: Some(rgba(0xff5571ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc3e88dff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xffcb6bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xc792eaff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x89ddffff).into()),
terminal_ansi_bright_white: Some(rgba(0xffffffff).into()),
terminal_ansi_black: Some(rgba(0x676e95ff).into()),
terminal_ansi_red: Some(rgba(0xff5571ff).into()),
terminal_ansi_green: Some(rgba(0xa9c77dff).into()),
terminal_ansi_yellow: Some(rgba(0xffcb6bff).into()),
terminal_ansi_blue: Some(rgba(0x82aaffff).into()),
terminal_ansi_magenta: Some(rgba(0xc792eaff).into()),
terminal_ansi_cyan: Some(rgba(0x89ddffff).into()),
terminal_ansi_white: Some(rgba(0xffffffff).into()),
..Default::default()
},
},
},
],
scales: default_color_scales(),
}
}