Add theme importer (#3246)
[[PR Description]]
Thanks @maxdeviant for all the help with this one 🫂
- Adds the `theme_importer` crate
- Adds the ability to import themes in VSCode Format.
- Adds the `assets/themes/src` folder with source files for imported
themes
- Adds an initial set of themes: `andromeda`, `ayu`, `dracula`,
`gruvbox`, `night-owl`, `noctis`, `palenight`, `rose-pine`, `solarized`,
`synthwave-84`.
From the README:
## Usage
- `cargo run -p theme_importer` - Import the context of
`assets/themes/src`
---
## Troubleshooting
As the importer generates rust files, you may need to manually do some
cleanup in `registry.rs` and `themes/mod.rs` if you remove themes or
delete the `themes` folder in the theme crate.
---
## Required Structure
To import a theme or series of themes 3 things are required:
- `family.json`: A JSON file containing the theme family metadata and
list of theme variants
- `{theme_name}.json`: One theme json for each theme variant
- `LICENSE`: A license file for the theme family
### `family.json`
#### `name`
The name of the theme family. Avoid special characters.
This will be used for the theme family directory name (lowercased) and
the theme family name in the Zed UI.
Good:
- `Rose Pine`
- `Synthwave 84`
- `Monokai Solarized`
Bad:
- `Rosé Pine`
- `Synthwave '84`
- `Monokai (Solarized)`
#### `author`
The author of the theme family. This can be a name or a username.
This will be used for the theme family author in the Zed UI.
#### `themes`
A list of theme variants.
`appearance` can be either `light` or `dark`. This will impact which
default fallback colors are used, and where the theme shows up in the
Zed UI.
### `{theme_name}.json`
Each theme added to the family must have a corresponding JSON file. This
JSON file can be obtained from the VSCode extensions folder (once you
have installed it.) This is usually located at `~/.vscode/extensions`
(on macOS).
You can use `open ~/.vscode/extensions` to open the folder in Finder
directly.
Copy that json file into the theme family directory and tidy up the
filenames as needed.
### `LICENSE`
A LICENSE file is required to import a theme family. Failing to provide
a complete text license will cause it to be skipped when the import is
run.
If the theme only provices a license code (e.g. MIT, Apache 2.0, etc.)
then put that code into the LICENSE file.
If no license is provided, either contact the theme creator or don't add
the theme.
---
### Complete Example:
An example family with multiple variants:
```json
{
"name": "Ayu",
// When both name and username are available
// prefer the `username (name)` format
"author": "dempfi (Ike Ku)",
"themes": [
{
"name": "Ayu Light",
"file_name": "ayu-light.json",
"appearance": "light"
},
{
"name": "Ayu Mirage",
"file_name": "ayu-mirage.json",
"appearance": "dark"
},
{
"name": "Ayu Dark",
"file_name": "ayu-dark.json",
"appearance": "dark"
}
]
}
```
An example single variant family:
```json
{
"name": "Andromeda",
"author": "Eliver Lara (EliverLara)",
"themes": [
{
"name": "Andromeda",
"file_name": "andromeda.json",
"appearance": "dark"
},
{
"name": "Andromeda Bordered",
"file_name": "andromeda-bordered.json",
"appearance": "dark"
}
]
}
```
Release Notes:
- N/A
This commit is contained in:
commit
99a57d922f
82 changed files with 44262 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::{zed_pro_family, ThemeFamily, ThemeVariant};
|
||||
use crate::{all_imported_themes, zed_pro_family, ThemeFamily, ThemeVariant};
|
||||
use anyhow::{anyhow, Result};
|
||||
use gpui::SharedString;
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
@ -42,7 +42,10 @@ impl Default for ThemeRegistry {
|
|||
themes: HashMap::default(),
|
||||
};
|
||||
|
||||
this.insert_theme_families([zed_pro_family()]);
|
||||
let mut all_themes = vec![zed_pro_family()];
|
||||
all_themes.extend(all_imported_themes());
|
||||
|
||||
this.insert_theme_families(all_themes);
|
||||
|
||||
this
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ mod registry;
|
|||
mod scale;
|
||||
mod settings;
|
||||
mod syntax;
|
||||
mod themes;
|
||||
|
||||
use ::settings::Settings;
|
||||
pub use colors::*;
|
||||
|
@ -14,6 +15,7 @@ pub use registry::*;
|
|||
pub use scale::*;
|
||||
pub use settings::*;
|
||||
pub use syntax::*;
|
||||
pub use themes::*;
|
||||
|
||||
use gpui::{AppContext, Hsla, SharedString};
|
||||
|
||||
|
@ -39,8 +41,7 @@ impl ActiveTheme for AppContext {
|
|||
}
|
||||
|
||||
pub struct ThemeFamily {
|
||||
#[allow(dead_code)]
|
||||
pub(crate) id: String,
|
||||
pub id: String,
|
||||
pub name: SharedString,
|
||||
pub author: SharedString,
|
||||
pub themes: Vec<ThemeVariant>,
|
||||
|
@ -50,8 +51,7 @@ pub struct ThemeFamily {
|
|||
impl ThemeFamily {}
|
||||
|
||||
pub struct ThemeVariant {
|
||||
#[allow(dead_code)]
|
||||
pub(crate) id: String,
|
||||
pub id: String,
|
||||
pub name: SharedString,
|
||||
pub appearance: Appearance,
|
||||
pub styles: ThemeStyles,
|
||||
|
|
333
crates/theme2/src/themes/andromeda.rs
Normal file
333
crates/theme2/src/themes/andromeda.rs
Normal file
|
@ -0,0 +1,333 @@
|
|||
use gpui::rgba;
|
||||
|
||||
use crate::{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
pub fn andromeda() -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: "192bb9a2-a028-4c9a-b713-4c92330b3fab".into(),
|
||||
name: "Andromeda".into(),
|
||||
author: "Eliver Lara (EliverLara)".into(),
|
||||
themes: vec![
|
||||
ThemeVariant {
|
||||
id: "a3aaa73f-f225-41bd-8d52-77ca1df0b7f7".into(),
|
||||
name: "Andromeda".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(0x1b1d23ff).into(),
|
||||
border_variant: rgba(0x1b1d23ff).into(),
|
||||
border_focused: rgba(0x1b1d23ff).into(),
|
||||
border_disabled: rgba(0x1b1d23ff).into(),
|
||||
border_selected: rgba(0x1b1d23ff).into(),
|
||||
border_transparent: rgba(0x1b1d23ff).into(),
|
||||
elevated_surface_background: rgba(0x23262eff).into(),
|
||||
surface_background: rgba(0x23262eff).into(),
|
||||
background: rgba(0x23262eff).into(),
|
||||
element_background: rgba(0x00e8c5cc).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(0xd4cdd8ff).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(0x23262eff).into(),
|
||||
tab_active_background: rgba(0x23262eff).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(0x000000e6).into(),
|
||||
terminal_ansi_bright_red: rgba(0xee5d42ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x95e072ff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xffe66dff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xb0b4baff).into(),
|
||||
terminal_ansi_black: rgba(0x000000f2).into(),
|
||||
terminal_ansi_red: rgba(0xee5d42ff).into(),
|
||||
terminal_ansi_green: rgba(0x95e072ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xffe66dff).into(),
|
||||
terminal_ansi_blue: rgba(0x7bb7ffff).into(),
|
||||
terminal_ansi_magenta: rgba(0xff00a9ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x00e8c6ff).into(),
|
||||
terminal_ansi_white: rgba(0xedeef0ff).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: "91a17b19-1e74-487e-b0a0-56e2e5360ab8".into(),
|
||||
name: "Andromeda Bordered".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(0x1b1d23ff).into(),
|
||||
border_variant: rgba(0x1b1d23ff).into(),
|
||||
border_focused: rgba(0x1b1d23ff).into(),
|
||||
border_disabled: rgba(0x1b1d23ff).into(),
|
||||
border_selected: rgba(0x1b1d23ff).into(),
|
||||
border_transparent: rgba(0x1b1d23ff).into(),
|
||||
elevated_surface_background: rgba(0x23262eff).into(),
|
||||
surface_background: rgba(0x23262eff).into(),
|
||||
background: rgba(0x262933ff).into(),
|
||||
element_background: rgba(0x00e8c5cc).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(0xd4cdd8ff).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(0x23262eff).into(),
|
||||
tab_active_background: rgba(0x262933ff).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(0x000000e6).into(),
|
||||
terminal_ansi_bright_red: rgba(0xee5d42ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x95e072ff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xffe66dff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x7bb7ffff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xff00a9ff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x00e8c6ff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xb0b4baff).into(),
|
||||
terminal_ansi_black: rgba(0x000000f2).into(),
|
||||
terminal_ansi_red: rgba(0xee5d42ff).into(),
|
||||
terminal_ansi_green: rgba(0x95e072ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xffe66dff).into(),
|
||||
terminal_ansi_blue: rgba(0x7bb7ffff).into(),
|
||||
terminal_ansi_magenta: rgba(0xff00a9ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x00e8c6ff).into(),
|
||||
terminal_ansi_white: rgba(0xedeef0ff).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(),
|
||||
}
|
||||
}
|
491
crates/theme2/src/themes/ayu.rs
Normal file
491
crates/theme2/src/themes/ayu.rs
Normal file
|
@ -0,0 +1,491 @@
|
|||
use gpui::rgba;
|
||||
|
||||
use crate::{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
pub fn ayu() -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: "5ace5bd5-0231-4f26-a69f-40a96dd4163e".into(),
|
||||
name: "Ayu".into(),
|
||||
author: "dempfi (Ike Ku)".into(),
|
||||
themes: vec![
|
||||
ThemeVariant {
|
||||
id: "7781d65c-4575-421d-af3c-061ab0b0478a".into(),
|
||||
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_disabled: rgba(0x6b7d8f1f).into(),
|
||||
border_selected: rgba(0x6b7d8f1f).into(),
|
||||
border_transparent: 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_subheader_background: rgba(0xf9f9fbff).into(),
|
||||
editor_active_line: rgba(0x0000320f).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(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: "68066666-5e56-4937-9434-510ffd0fe05f".into(),
|
||||
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_disabled: rgba(0x171a24ff).into(),
|
||||
border_selected: rgba(0x171a24ff).into(),
|
||||
border_transparent: 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_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).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(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: "d4f949b8-e5b9-4337-a52e-2ed1752a6c4f".into(),
|
||||
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_disabled: rgba(0x1e232bff).into(),
|
||||
border_selected: rgba(0x1e232bff).into(),
|
||||
border_transparent: 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_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).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(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(),
|
||||
}
|
||||
}
|
173
crates/theme2/src/themes/dracula.rs
Normal file
173
crates/theme2/src/themes/dracula.rs
Normal file
|
@ -0,0 +1,173 @@
|
|||
use gpui::rgba;
|
||||
|
||||
use crate::{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
pub fn dracula() -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: "20b9a8c0-0b74-483b-bed2-be7a053e1321".into(),
|
||||
name: "Dracula".into(),
|
||||
author: "Zeno Rocha".into(),
|
||||
themes: vec![ThemeVariant {
|
||||
id: "02f5624f-9b0a-48e0-8897-4557adc8f104".into(),
|
||||
name: "Dracula".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(0xbd93f9ff).into(),
|
||||
border_variant: rgba(0xbd93f9ff).into(),
|
||||
border_focused: rgba(0xbd93f9ff).into(),
|
||||
border_disabled: rgba(0xbd93f9ff).into(),
|
||||
border_selected: rgba(0xbd93f9ff).into(),
|
||||
border_transparent: rgba(0xbd93f9ff).into(),
|
||||
elevated_surface_background: rgba(0x282a35ff).into(),
|
||||
surface_background: rgba(0x282a35ff).into(),
|
||||
background: rgba(0x282a35ff).into(),
|
||||
element_background: rgba(0x44475aff).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(0xf8f8f2ff).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(0x21222cff).into(),
|
||||
tab_active_background: rgba(0x282a35ff).into(),
|
||||
editor_background: rgba(0x111113ff).into(),
|
||||
editor_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).into(),
|
||||
terminal_background: rgba(0x282a35ff).into(),
|
||||
terminal_ansi_bright_black: rgba(0x6272a4ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0xff6d6dff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x69ff94ff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xffffa5ff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0xd6abfeff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xff92dfff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0xa3fefeff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xffffffff).into(),
|
||||
terminal_ansi_black: rgba(0x21222cff).into(),
|
||||
terminal_ansi_red: rgba(0xff5555ff).into(),
|
||||
terminal_ansi_green: rgba(0x50fa7bff).into(),
|
||||
terminal_ansi_yellow: rgba(0xf1fa8cff).into(),
|
||||
terminal_ansi_blue: rgba(0xbd93f9ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xff79c6ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x8be9fdff).into(),
|
||||
terminal_ansi_white: rgba(0xf8f8f2ff).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(),
|
||||
}
|
||||
}
|
965
crates/theme2/src/themes/gruvbox.rs
Normal file
965
crates/theme2/src/themes/gruvbox.rs
Normal file
|
@ -0,0 +1,965 @@
|
|||
use gpui::rgba;
|
||||
|
||||
use crate::{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
pub fn gruvbox() -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: "c0b7f0e7-f261-4a33-a2bf-baf2e140aac4".into(),
|
||||
name: "Gruvbox".into(),
|
||||
author: "morhetz".into(),
|
||||
themes: vec![
|
||||
ThemeVariant {
|
||||
id: "fb9f8f64-372b-4fda-8dbd-d610c97a9691".into(),
|
||||
name: "Gruvbox Dark Hard".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(0x3c3836ff).into(),
|
||||
border_variant: rgba(0x3c3836ff).into(),
|
||||
border_focused: rgba(0x3c3836ff).into(),
|
||||
border_disabled: rgba(0x3c3836ff).into(),
|
||||
border_selected: rgba(0x3c3836ff).into(),
|
||||
border_transparent: rgba(0x3c3836ff).into(),
|
||||
elevated_surface_background: rgba(0x18191bff).into(),
|
||||
surface_background: rgba(0x18191bff).into(),
|
||||
background: rgba(0x1d2021ff).into(),
|
||||
element_background: rgba(0x44858780).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(0xebdbb2ff).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(0x1d2021ff).into(),
|
||||
tab_active_background: rgba(0x32302fff).into(),
|
||||
editor_background: rgba(0x111113ff).into(),
|
||||
editor_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).into(),
|
||||
terminal_background: rgba(0x1d2021ff).into(),
|
||||
terminal_ansi_bright_black: rgba(0x928374ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0xfb4833ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0xb8bb25ff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x83a598ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xd3869bff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xebdbb2ff).into(),
|
||||
terminal_ansi_black: rgba(0x3c3836ff).into(),
|
||||
terminal_ansi_red: rgba(0xcc241cff).into(),
|
||||
terminal_ansi_green: rgba(0x989719ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xd79920ff).into(),
|
||||
terminal_ansi_blue: rgba(0x448587ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xb16185ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x679d6aff).into(),
|
||||
terminal_ansi_white: rgba(0xa89984ff).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: "72f0ea45-33bc-49d8-9f52-87540f858fb4".into(),
|
||||
name: "Gruvbox Dark Medium".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(0x3c3836ff).into(),
|
||||
border_variant: rgba(0x3c3836ff).into(),
|
||||
border_focused: rgba(0x3c3836ff).into(),
|
||||
border_disabled: rgba(0x3c3836ff).into(),
|
||||
border_selected: rgba(0x3c3836ff).into(),
|
||||
border_transparent: rgba(0x3c3836ff).into(),
|
||||
elevated_surface_background: rgba(0x18191bff).into(),
|
||||
surface_background: rgba(0x18191bff).into(),
|
||||
background: rgba(0x282828ff).into(),
|
||||
element_background: rgba(0x44858780).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(0xebdbb2ff).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(0x282828ff).into(),
|
||||
tab_active_background: rgba(0x3c3836ff).into(),
|
||||
editor_background: rgba(0x111113ff).into(),
|
||||
editor_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).into(),
|
||||
terminal_background: rgba(0x282828ff).into(),
|
||||
terminal_ansi_bright_black: rgba(0x928374ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0xfb4833ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0xb8bb25ff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x83a598ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xd3869bff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xebdbb2ff).into(),
|
||||
terminal_ansi_black: rgba(0x3c3836ff).into(),
|
||||
terminal_ansi_red: rgba(0xcc241cff).into(),
|
||||
terminal_ansi_green: rgba(0x989719ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xd79920ff).into(),
|
||||
terminal_ansi_blue: rgba(0x448587ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xb16185ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x679d6aff).into(),
|
||||
terminal_ansi_white: rgba(0xa89984ff).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: "5ea1cdf8-6ed0-4e54-b44a-14c6634701cf".into(),
|
||||
name: "Gruvbox Dark Soft".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(0x3c3836ff).into(),
|
||||
border_variant: rgba(0x3c3836ff).into(),
|
||||
border_focused: rgba(0x3c3836ff).into(),
|
||||
border_disabled: rgba(0x3c3836ff).into(),
|
||||
border_selected: rgba(0x3c3836ff).into(),
|
||||
border_transparent: rgba(0x3c3836ff).into(),
|
||||
elevated_surface_background: rgba(0x18191bff).into(),
|
||||
surface_background: rgba(0x18191bff).into(),
|
||||
background: rgba(0x32302fff).into(),
|
||||
element_background: rgba(0x44858780).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(0xebdbb2ff).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(0x32302fff).into(),
|
||||
tab_active_background: rgba(0x504945ff).into(),
|
||||
editor_background: rgba(0x111113ff).into(),
|
||||
editor_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).into(),
|
||||
terminal_background: rgba(0x32302fff).into(),
|
||||
terminal_ansi_bright_black: rgba(0x928374ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0xfb4833ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0xb8bb25ff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xfabd2eff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x83a598ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xd3869bff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x8ec07cff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xebdbb2ff).into(),
|
||||
terminal_ansi_black: rgba(0x3c3836ff).into(),
|
||||
terminal_ansi_red: rgba(0xcc241cff).into(),
|
||||
terminal_ansi_green: rgba(0x989719ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xd79920ff).into(),
|
||||
terminal_ansi_blue: rgba(0x448587ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xb16185ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x679d6aff).into(),
|
||||
terminal_ansi_white: rgba(0xa89984ff).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: "b0c9082f-00c8-4a02-a4de-9fd7af97c7f2".into(),
|
||||
name: "Gruvbox Light Hard".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(0xebdbb2ff).into(),
|
||||
border_variant: rgba(0xebdbb2ff).into(),
|
||||
border_focused: rgba(0xebdbb2ff).into(),
|
||||
border_disabled: rgba(0xebdbb2ff).into(),
|
||||
border_selected: rgba(0xebdbb2ff).into(),
|
||||
border_transparent: rgba(0xebdbb2ff).into(),
|
||||
elevated_surface_background: rgba(0xf9f9fbff).into(),
|
||||
surface_background: rgba(0xf9f9fbff).into(),
|
||||
background: rgba(0xf9f5d7ff).into(),
|
||||
element_background: rgba(0x44858780).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(0x3c3836ff).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(0xf9f5d7ff).into(),
|
||||
tab_active_background: rgba(0xf2e5bcff).into(),
|
||||
editor_background: rgba(0xfcfcfdff).into(),
|
||||
editor_subheader_background: rgba(0xf9f9fbff).into(),
|
||||
editor_active_line: rgba(0x0000320f).into(),
|
||||
terminal_background: rgba(0xf9f5d7ff).into(),
|
||||
terminal_ansi_bright_black: rgba(0x928374ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0x9d0006ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x79740eff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xb57613ff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x066578ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x427b58ff).into(),
|
||||
terminal_ansi_bright_white: rgba(0x3c3836ff).into(),
|
||||
terminal_ansi_black: rgba(0xebdbb2ff).into(),
|
||||
terminal_ansi_red: rgba(0xcc241cff).into(),
|
||||
terminal_ansi_green: rgba(0x989719ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xd79920ff).into(),
|
||||
terminal_ansi_blue: rgba(0x448587ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xb16185ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x679d6aff).into(),
|
||||
terminal_ansi_white: rgba(0x7c6f64ff).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: "172c281c-ff0a-496e-8794-880e2fc3aa49".into(),
|
||||
name: "Gruvbox Light Medium".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(0xebdbb2ff).into(),
|
||||
border_variant: rgba(0xebdbb2ff).into(),
|
||||
border_focused: rgba(0xebdbb2ff).into(),
|
||||
border_disabled: rgba(0xebdbb2ff).into(),
|
||||
border_selected: rgba(0xebdbb2ff).into(),
|
||||
border_transparent: rgba(0xebdbb2ff).into(),
|
||||
elevated_surface_background: rgba(0xf9f9fbff).into(),
|
||||
surface_background: rgba(0xf9f9fbff).into(),
|
||||
background: rgba(0xfbf1c7ff).into(),
|
||||
element_background: rgba(0x44858780).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(0x3c3836ff).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(0xfbf1c7ff).into(),
|
||||
tab_active_background: rgba(0xebdbb2ff).into(),
|
||||
editor_background: rgba(0xfcfcfdff).into(),
|
||||
editor_subheader_background: rgba(0xf9f9fbff).into(),
|
||||
editor_active_line: rgba(0x0000320f).into(),
|
||||
terminal_background: rgba(0xfbf1c7ff).into(),
|
||||
terminal_ansi_bright_black: rgba(0x928374ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0x9d0006ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x79740eff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xb57613ff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x066578ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x427b58ff).into(),
|
||||
terminal_ansi_bright_white: rgba(0x3c3836ff).into(),
|
||||
terminal_ansi_black: rgba(0xebdbb2ff).into(),
|
||||
terminal_ansi_red: rgba(0xcc241cff).into(),
|
||||
terminal_ansi_green: rgba(0x989719ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xd79920ff).into(),
|
||||
terminal_ansi_blue: rgba(0x448587ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xb16185ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x679d6aff).into(),
|
||||
terminal_ansi_white: rgba(0x7c6f64ff).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: "b94f3305-b755-44f2-948c-cfd8c9d3158f".into(),
|
||||
name: "Gruvbox Light Soft".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(0xebdbb2ff).into(),
|
||||
border_variant: rgba(0xebdbb2ff).into(),
|
||||
border_focused: rgba(0xebdbb2ff).into(),
|
||||
border_disabled: rgba(0xebdbb2ff).into(),
|
||||
border_selected: rgba(0xebdbb2ff).into(),
|
||||
border_transparent: rgba(0xebdbb2ff).into(),
|
||||
elevated_surface_background: rgba(0xf9f9fbff).into(),
|
||||
surface_background: rgba(0xf9f9fbff).into(),
|
||||
background: rgba(0xf2e5bcff).into(),
|
||||
element_background: rgba(0x44858780).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(0x3c3836ff).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(0xf2e5bcff).into(),
|
||||
tab_active_background: rgba(0xd5c4a1ff).into(),
|
||||
editor_background: rgba(0xfcfcfdff).into(),
|
||||
editor_subheader_background: rgba(0xf9f9fbff).into(),
|
||||
editor_active_line: rgba(0x0000320f).into(),
|
||||
terminal_background: rgba(0xf2e5bcff).into(),
|
||||
terminal_ansi_bright_black: rgba(0x928374ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0x9d0006ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x79740eff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xb57613ff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x066578ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0x8f3e71ff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x427b58ff).into(),
|
||||
terminal_ansi_bright_white: rgba(0x3c3836ff).into(),
|
||||
terminal_ansi_black: rgba(0xebdbb2ff).into(),
|
||||
terminal_ansi_red: rgba(0xcc241cff).into(),
|
||||
terminal_ansi_green: rgba(0x989719ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xd79920ff).into(),
|
||||
terminal_ansi_blue: rgba(0x448587ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xb16185ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x679d6aff).into(),
|
||||
terminal_ansi_white: rgba(0x7c6f64ff).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(),
|
||||
}
|
||||
}
|
41
crates/theme2/src/themes/mod.rs
Normal file
41
crates/theme2/src/themes/mod.rs
Normal file
|
@ -0,0 +1,41 @@
|
|||
mod andromeda;
|
||||
mod ayu;
|
||||
mod dracula;
|
||||
mod gruvbox;
|
||||
mod night_owl;
|
||||
mod nord;
|
||||
mod notctis;
|
||||
mod palenight;
|
||||
mod rose_pine;
|
||||
mod solarized;
|
||||
mod synthwave_84;
|
||||
|
||||
pub use andromeda::*;
|
||||
pub use ayu::*;
|
||||
pub use dracula::*;
|
||||
pub use gruvbox::*;
|
||||
pub use night_owl::*;
|
||||
pub use nord::*;
|
||||
pub use notctis::*;
|
||||
pub use palenight::*;
|
||||
pub use rose_pine::*;
|
||||
pub use solarized::*;
|
||||
pub use synthwave_84::*;
|
||||
|
||||
use crate::ThemeFamily;
|
||||
|
||||
pub(crate) fn all_imported_themes() -> Vec<ThemeFamily> {
|
||||
vec![
|
||||
rose_pine(),
|
||||
night_owl(),
|
||||
andromeda(),
|
||||
synthwave_84(),
|
||||
palenight(),
|
||||
dracula(),
|
||||
solarized(),
|
||||
nord(),
|
||||
notctis(),
|
||||
ayu(),
|
||||
gruvbox(),
|
||||
]
|
||||
}
|
333
crates/theme2/src/themes/night_owl.rs
Normal file
333
crates/theme2/src/themes/night_owl.rs
Normal file
|
@ -0,0 +1,333 @@
|
|||
use gpui::rgba;
|
||||
|
||||
use crate::{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
pub fn night_owl() -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: "b6469599-df68-4604-be9d-44f63d877d53".into(),
|
||||
name: "Night Owl".into(),
|
||||
author: "Sarah Drasner (sdras)".into(),
|
||||
themes: vec![
|
||||
ThemeVariant {
|
||||
id: "2a04e5fa-e266-475b-b965-3d92efe77ad9".into(),
|
||||
name: "Night Owl".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(0x5f7e97ff).into(),
|
||||
border_variant: rgba(0x5f7e97ff).into(),
|
||||
border_focused: rgba(0x5f7e97ff).into(),
|
||||
border_disabled: rgba(0x5f7e97ff).into(),
|
||||
border_selected: rgba(0x5f7e97ff).into(),
|
||||
border_transparent: rgba(0x5f7e97ff).into(),
|
||||
elevated_surface_background: rgba(0x011526ff).into(),
|
||||
surface_background: rgba(0x011526ff).into(),
|
||||
background: rgba(0x011526ff).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(0xd6deebff).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(0x01101cff).into(),
|
||||
tab_active_background: rgba(0x0a2842ff).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(0x575656ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0xef524fff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x21da6eff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xffeb95ff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x82aaffff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xc792eaff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x7fdbcaff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xffffffff).into(),
|
||||
terminal_ansi_black: rgba(0x011526ff).into(),
|
||||
terminal_ansi_red: rgba(0xef524fff).into(),
|
||||
terminal_ansi_green: rgba(0x21da6eff).into(),
|
||||
terminal_ansi_yellow: rgba(0xc5e478ff).into(),
|
||||
terminal_ansi_blue: rgba(0x82aaffff).into(),
|
||||
terminal_ansi_magenta: rgba(0xc792eaff).into(),
|
||||
terminal_ansi_cyan: rgba(0x20c7a7ff).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(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: "91901d29-1c1f-49ef-ac69-c25639425f7c".into(),
|
||||
name: "Night Owl 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(0xd9d9d9ff).into(),
|
||||
border_variant: rgba(0xd9d9d9ff).into(),
|
||||
border_focused: rgba(0xd9d9d9ff).into(),
|
||||
border_disabled: rgba(0xd9d9d9ff).into(),
|
||||
border_selected: rgba(0xd9d9d9ff).into(),
|
||||
border_transparent: rgba(0xd9d9d9ff).into(),
|
||||
elevated_surface_background: rgba(0xf0f0f0ff).into(),
|
||||
surface_background: rgba(0xf0f0f0ff).into(),
|
||||
background: rgba(0xfbfbfbff).into(),
|
||||
element_background: rgba(0x29a298ff).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(0x403f53ff).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(0xf0f0f0ff).into(),
|
||||
tab_active_background: rgba(0xf6f6f6ff).into(),
|
||||
editor_background: rgba(0xfcfcfdff).into(),
|
||||
editor_subheader_background: rgba(0xf9f9fbff).into(),
|
||||
editor_active_line: rgba(0x0000320f).into(),
|
||||
terminal_background: rgba(0xf6f6f6ff).into(),
|
||||
terminal_ansi_bright_black: rgba(0x403f53ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0xde3c3aff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x07916aff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xdaa900ff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x278dd7ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xd64289ff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x29a298ff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xf0f0f0ff).into(),
|
||||
terminal_ansi_black: rgba(0x403f53ff).into(),
|
||||
terminal_ansi_red: rgba(0xde3c3aff).into(),
|
||||
terminal_ansi_green: rgba(0x07916aff).into(),
|
||||
terminal_ansi_yellow: rgba(0xe0ae01ff).into(),
|
||||
terminal_ansi_blue: rgba(0x278dd7ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xd64289ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x29a298ff).into(),
|
||||
terminal_ansi_white: rgba(0xf0f0f0ff).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(),
|
||||
}
|
||||
}
|
173
crates/theme2/src/themes/nord.rs
Normal file
173
crates/theme2/src/themes/nord.rs
Normal file
|
@ -0,0 +1,173 @@
|
|||
use gpui::rgba;
|
||||
|
||||
use crate::{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
pub fn nord() -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: "dcd03133-f540-47e7-9360-91bb1c94d16e".into(),
|
||||
name: "Nord".into(),
|
||||
author: "Sven Greb (svengreb)".into(),
|
||||
themes: vec![ThemeVariant {
|
||||
id: "ed7e8c08-321a-41f0-bd22-ca92c0b42e0e".into(),
|
||||
name: "Nord".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(0x3b4252ff).into(),
|
||||
border_variant: rgba(0x3b4252ff).into(),
|
||||
border_focused: rgba(0x3b4252ff).into(),
|
||||
border_disabled: rgba(0x3b4252ff).into(),
|
||||
border_selected: rgba(0x3b4252ff).into(),
|
||||
border_transparent: rgba(0x3b4252ff).into(),
|
||||
elevated_surface_background: rgba(0x2e3440ff).into(),
|
||||
surface_background: rgba(0x2e3440ff).into(),
|
||||
background: rgba(0x2e3440ff).into(),
|
||||
element_background: rgba(0x88bfd0ee).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(0xd8dee9ff).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(0x2e3440ff).into(),
|
||||
tab_active_background: rgba(0x3b4252ff).into(),
|
||||
editor_background: rgba(0x111113ff).into(),
|
||||
editor_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).into(),
|
||||
terminal_background: rgba(0x2e3440ff).into(),
|
||||
terminal_ansi_bright_black: rgba(0x4c566aff).into(),
|
||||
terminal_ansi_bright_red: rgba(0xbf616aff).into(),
|
||||
terminal_ansi_bright_green: rgba(0xa3be8cff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xebcb8bff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x81a1c1ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xb48eacff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x8fbcbbff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xeceff4ff).into(),
|
||||
terminal_ansi_black: rgba(0x3b4252ff).into(),
|
||||
terminal_ansi_red: rgba(0xbf616aff).into(),
|
||||
terminal_ansi_green: rgba(0xa3be8cff).into(),
|
||||
terminal_ansi_yellow: rgba(0xebcb8bff).into(),
|
||||
terminal_ansi_blue: rgba(0x81a1c1ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xb48eacff).into(),
|
||||
terminal_ansi_cyan: rgba(0x88bfd0ff).into(),
|
||||
terminal_ansi_white: rgba(0xe5e9f0ff).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(),
|
||||
}
|
||||
}
|
1755
crates/theme2/src/themes/notctis.rs
Normal file
1755
crates/theme2/src/themes/notctis.rs
Normal file
File diff suppressed because it is too large
Load diff
491
crates/theme2/src/themes/palenight.rs
Normal file
491
crates/theme2/src/themes/palenight.rs
Normal file
|
@ -0,0 +1,491 @@
|
|||
use gpui::rgba;
|
||||
|
||||
use crate::{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
pub fn palenight() -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: "3187cd2f-29da-4bde-9621-83016df3b393".into(),
|
||||
name: "Palenight".into(),
|
||||
author: "Olaolu Olawuyi (whizkydee)".into(),
|
||||
themes: vec![
|
||||
ThemeVariant {
|
||||
id: "0eaa3098-3aa2-4b8e-b1df-92d9ebd9a0b8".into(),
|
||||
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_disabled: rgba(0x282b3bff).into(),
|
||||
border_selected: rgba(0x282b3bff).into(),
|
||||
border_transparent: 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_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).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(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: "b6a27c72-c5b1-431b-8bfe-29e33dbcb337".into(),
|
||||
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_disabled: rgba(0x282b3bff).into(),
|
||||
border_selected: rgba(0x282b3bff).into(),
|
||||
border_transparent: 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_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).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(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: "4015bf85-061c-45ff-81ba-a31f017aac83".into(),
|
||||
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_disabled: rgba(0x2c2f40ff).into(),
|
||||
border_selected: rgba(0x2c2f40ff).into(),
|
||||
border_transparent: 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_subheader_background: rgba(0x18191bff).into(),
|
||||
editor_active_line: rgba(0xddeaf814).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(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(),
|
||||
}
|
||||
}
|
491
crates/theme2/src/themes/rose_pine.rs
Normal file
491
crates/theme2/src/themes/rose_pine.rs
Normal file
|
@ -0,0 +1,491 @@
|
|||
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(),
|
||||
}
|
||||
}
|
333
crates/theme2/src/themes/solarized.rs
Normal file
333
crates/theme2/src/themes/solarized.rs
Normal file
|
@ -0,0 +1,333 @@
|
|||
use gpui::rgba;
|
||||
|
||||
use crate::{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
pub fn solarized() -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: "9a6f18c9-520f-46ec-9bfb-a7ee73508139".into(),
|
||||
name: "Solarized".into(),
|
||||
author: "Ethan Schoonover (altercation)".into(),
|
||||
themes: vec![
|
||||
ThemeVariant {
|
||||
id: "74003db2-7f9a-4d26-8815-020c796bb551".into(),
|
||||
name: "Solarized 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(0x003847ff).into(),
|
||||
border_variant: rgba(0x003847ff).into(),
|
||||
border_focused: rgba(0x003847ff).into(),
|
||||
border_disabled: rgba(0x003847ff).into(),
|
||||
border_selected: rgba(0x003847ff).into(),
|
||||
border_transparent: rgba(0x003847ff).into(),
|
||||
elevated_surface_background: rgba(0x18191bff).into(),
|
||||
surface_background: rgba(0x18191bff).into(),
|
||||
background: rgba(0x002a35ff).into(),
|
||||
element_background: rgba(0x29a19899).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(0xedeef0ff).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(0x003f51ff).into(),
|
||||
tab_active_background: rgba(0x002a36ff).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(0x586e75ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0xcb4b15ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x859900ff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0x657b83ff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x839496ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0x6c71c4ff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x93a1a1ff).into(),
|
||||
terminal_ansi_bright_white: rgba(0x839496ff).into(),
|
||||
terminal_ansi_black: rgba(0x063642ff).into(),
|
||||
terminal_ansi_red: rgba(0xdc312eff).into(),
|
||||
terminal_ansi_green: rgba(0x859900ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xb58800ff).into(),
|
||||
terminal_ansi_blue: rgba(0x258ad2ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xd33582ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x29a198ff).into(),
|
||||
terminal_ansi_white: rgba(0x839496ff).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: "43be149b-2604-4eb2-a9ce-c8f902ab3bb3".into(),
|
||||
name: "Solarized 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(0xddd6c1ff).into(),
|
||||
border_variant: rgba(0xddd6c1ff).into(),
|
||||
border_focused: rgba(0xddd6c1ff).into(),
|
||||
border_disabled: rgba(0xddd6c1ff).into(),
|
||||
border_selected: rgba(0xddd6c1ff).into(),
|
||||
border_transparent: rgba(0xddd6c1ff).into(),
|
||||
elevated_surface_background: rgba(0xf9f9fbff).into(),
|
||||
surface_background: rgba(0xf9f9fbff).into(),
|
||||
background: rgba(0xfdf6e3ff).into(),
|
||||
element_background: rgba(0xab9d56ff).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(0x1c2024ff).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(0xd3cbb7ff).into(),
|
||||
tab_active_background: rgba(0xfdf6e3ff).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(0x657b83ff).into(),
|
||||
terminal_ansi_bright_red: rgba(0xcb4b15ff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x859900ff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0x657b83ff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x839496ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0x6c71c4ff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x93a1a1ff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xeee8d5ff).into(),
|
||||
terminal_ansi_black: rgba(0x657b83ff).into(),
|
||||
terminal_ansi_red: rgba(0xdc312eff).into(),
|
||||
terminal_ansi_green: rgba(0x859900ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xb58800ff).into(),
|
||||
terminal_ansi_blue: rgba(0x258ad2ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xd33582ff).into(),
|
||||
terminal_ansi_cyan: rgba(0x29a198ff).into(),
|
||||
terminal_ansi_white: rgba(0xeee8d5ff).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(),
|
||||
}
|
||||
}
|
173
crates/theme2/src/themes/synthwave_84.rs
Normal file
173
crates/theme2/src/themes/synthwave_84.rs
Normal file
|
@ -0,0 +1,173 @@
|
|||
use gpui::rgba;
|
||||
|
||||
use crate::{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
pub fn synthwave_84() -> ThemeFamily {
|
||||
ThemeFamily {
|
||||
id: "5e0f0cd5-5522-45cf-a652-caeb140eb3de".into(),
|
||||
name: "Synthwave 84".into(),
|
||||
author: "Robb Owen (robb0wen)".into(),
|
||||
themes: vec![ThemeVariant {
|
||||
id: "83110d9e-dbf0-4f36-9a4c-6b396ce9a5a4".into(),
|
||||
name: "Synthwave 84".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(0x363a3fff).into(),
|
||||
border_variant: rgba(0x2e3135ff).into(),
|
||||
border_focused: rgba(0x004073ff).into(),
|
||||
border_disabled: rgba(0x212225ff).into(),
|
||||
border_selected: rgba(0x004073ff).into(),
|
||||
border_transparent: rgba(0x00000000).into(),
|
||||
elevated_surface_background: rgba(0x18191bff).into(),
|
||||
surface_background: rgba(0x18191bff).into(),
|
||||
background: rgba(0x252334ff).into(),
|
||||
element_background: rgba(0x614d85ff).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(0x252334ff).into(),
|
||||
tab_active_background: rgba(0x111113ff).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(0x000000e6).into(),
|
||||
terminal_ansi_bright_red: rgba(0xfe444fff).into(),
|
||||
terminal_ansi_bright_green: rgba(0x71f1b7ff).into(),
|
||||
terminal_ansi_bright_yellow: rgba(0xfede5cff).into(),
|
||||
terminal_ansi_bright_blue: rgba(0x02edf9ff).into(),
|
||||
terminal_ansi_bright_magenta: rgba(0xff7ddaff).into(),
|
||||
terminal_ansi_bright_cyan: rgba(0x02edf9ff).into(),
|
||||
terminal_ansi_bright_white: rgba(0xb0b4baff).into(),
|
||||
terminal_ansi_black: rgba(0x000000f2).into(),
|
||||
terminal_ansi_red: rgba(0xfe444fff).into(),
|
||||
terminal_ansi_green: rgba(0x71f1b7ff).into(),
|
||||
terminal_ansi_yellow: rgba(0xf3e70fff).into(),
|
||||
terminal_ansi_blue: rgba(0x02edf9ff).into(),
|
||||
terminal_ansi_magenta: rgba(0xff7ddaff).into(),
|
||||
terminal_ansi_cyan: rgba(0x02edf9ff).into(),
|
||||
terminal_ansi_white: rgba(0xedeef0ff).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(),
|
||||
}
|
||||
}
|
18
crates/theme_importer/Cargo.toml
Normal file
18
crates/theme_importer/Cargo.toml
Normal file
|
@ -0,0 +1,18 @@
|
|||
[package]
|
||||
name = "theme_importer"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
convert_case = "0.6.0"
|
||||
gpui = { package = "gpui2", path = "../gpui2" }
|
||||
log.workspace = true
|
||||
rust-embed.workspace = true
|
||||
serde.workspace = true
|
||||
simplelog = "0.9"
|
||||
theme = { package = "theme2", path = "../theme2" }
|
||||
uuid.workspace = true
|
124
crates/theme_importer/README.md
Normal file
124
crates/theme_importer/README.md
Normal file
|
@ -0,0 +1,124 @@
|
|||
# Zed Theme Importer
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
- `cargo run -p theme_importer` - Import the context of `assets/themes/src`
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
As the importer generates rust files, you may need to manually do some cleanup in `registry.rs` and `themes/mod.rs` if you remove themes or delete the `themes` folder in the theme crate.
|
||||
|
||||
---
|
||||
|
||||
## Required Structure
|
||||
|
||||
To import a theme or series of themes 3 things are required:
|
||||
|
||||
- `family.json`: A JSON file containing the theme family metadata and list of theme variants
|
||||
- `{theme_name}.json`: One theme json for each theme variant
|
||||
- `LICENSE`: A license file for the theme family
|
||||
|
||||
### `family.json`
|
||||
|
||||
#### `name`
|
||||
|
||||
The name of the theme family. Avoid special characters.
|
||||
|
||||
This will be used for the theme family directory name (lowercased) and the theme family name in the Zed UI.
|
||||
|
||||
Good:
|
||||
|
||||
- `Rose Pine`
|
||||
- `Synthwave 84`
|
||||
- `Monokai Solarized`
|
||||
|
||||
Bad:
|
||||
|
||||
- `Rosé Pine`
|
||||
- `Synthwave '84`
|
||||
- `Monokai (Solarized)`
|
||||
|
||||
#### `author`
|
||||
|
||||
The author of the theme family. This can be a name or a username.
|
||||
|
||||
This will be used for the theme family author in the Zed UI.
|
||||
|
||||
#### `themes`
|
||||
|
||||
A list of theme variants.
|
||||
|
||||
`appearance` can be either `light` or `dark`. This will impact which default fallback colors are used, and where the theme shows up in the Zed UI.
|
||||
|
||||
### `{theme_name}.json`
|
||||
|
||||
Each theme added to the family must have a corresponding JSON file. This JSON file can be obtained from the VSCode extensions folder (once you have installed it.) This is usually located at `~/.vscode/extensions` (on macOS).
|
||||
|
||||
You can use `open ~/.vscode/extensions` to open the folder in Finder directly.
|
||||
|
||||
Copy that json file into the theme family directory and tidy up the filenames as needed.
|
||||
|
||||
### `LICENSE`
|
||||
|
||||
A LICENSE file is required to import a theme family. Failing to provide a complete text license will cause it to be skipped when the import is run.
|
||||
|
||||
If the theme only provices a license code (e.g. MIT, Apache 2.0, etc.) then put that code into the LICENSE file.
|
||||
|
||||
If no license is provided, either contact the theme creator or don't add the theme.
|
||||
|
||||
---
|
||||
|
||||
### Complete Example:
|
||||
|
||||
An example family with multiple variants:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Ayu",
|
||||
// When both name and username are available
|
||||
// prefer the `username (name)` format
|
||||
"author": "dempfi (Ike Ku)",
|
||||
"themes": [
|
||||
{
|
||||
"name": "Ayu Light",
|
||||
"file_name": "ayu-light.json",
|
||||
"appearance": "light"
|
||||
},
|
||||
{
|
||||
"name": "Ayu Mirage",
|
||||
"file_name": "ayu-mirage.json",
|
||||
"appearance": "dark"
|
||||
},
|
||||
{
|
||||
"name": "Ayu Dark",
|
||||
"file_name": "ayu-dark.json",
|
||||
"appearance": "dark"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
An example single variant family:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Andromeda",
|
||||
"author": "Eliver Lara (EliverLara)",
|
||||
"themes": [
|
||||
{
|
||||
"name": "Andromeda",
|
||||
"file_name": "andromeda.json",
|
||||
"appearance": "dark"
|
||||
},
|
||||
{
|
||||
"name": "Andromeda Bordered",
|
||||
"file_name": "andromeda-bordered.json",
|
||||
"appearance": "dark"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
215
crates/theme_importer/src/main.rs
Normal file
215
crates/theme_importer/src/main.rs
Normal file
|
@ -0,0 +1,215 @@
|
|||
mod theme_printer;
|
||||
mod util;
|
||||
mod vscode;
|
||||
|
||||
use std::fs::{self, File};
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use convert_case::{Case, Casing};
|
||||
use gpui::serde_json;
|
||||
use log::LevelFilter;
|
||||
use serde::Deserialize;
|
||||
use simplelog::SimpleLogger;
|
||||
use theme::{default_color_scales, Appearance, ThemeFamily};
|
||||
use vscode::VsCodeThemeConverter;
|
||||
|
||||
use crate::theme_printer::ThemeFamilyPrinter;
|
||||
use crate::vscode::VsCodeTheme;
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct FamilyMetadata {
|
||||
pub name: String,
|
||||
pub author: String,
|
||||
pub themes: Vec<ThemeMetadata>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ThemeAppearanceJson {
|
||||
Light,
|
||||
Dark,
|
||||
}
|
||||
|
||||
impl From<ThemeAppearanceJson> for Appearance {
|
||||
fn from(value: ThemeAppearanceJson) -> Self {
|
||||
match value {
|
||||
ThemeAppearanceJson::Light => Self::Light,
|
||||
ThemeAppearanceJson::Dark => Self::Dark,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct ThemeMetadata {
|
||||
pub name: String,
|
||||
pub file_name: String,
|
||||
pub appearance: ThemeAppearanceJson,
|
||||
}
|
||||
|
||||
fn main() -> Result<()> {
|
||||
const SOURCE_PATH: &str = "assets/themes/src/vscode";
|
||||
const OUT_PATH: &str = "crates/theme2/src/themes";
|
||||
|
||||
SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger");
|
||||
|
||||
println!("Loading themes source...");
|
||||
let vscode_themes_path = PathBuf::from_str(SOURCE_PATH)?;
|
||||
if !vscode_themes_path.exists() {
|
||||
return Err(anyhow!(format!(
|
||||
"Couldn't find {}, make sure it exists",
|
||||
SOURCE_PATH
|
||||
)));
|
||||
}
|
||||
|
||||
let mut theme_families = Vec::new();
|
||||
|
||||
for theme_family_dir in fs::read_dir(&vscode_themes_path)? {
|
||||
let theme_family_dir = theme_family_dir?;
|
||||
|
||||
if !theme_family_dir.file_type()?.is_dir() {
|
||||
continue;
|
||||
}
|
||||
|
||||
let theme_family_slug = theme_family_dir
|
||||
.path()
|
||||
.file_stem()
|
||||
.ok_or(anyhow!("no file stem"))
|
||||
.map(|stem| stem.to_string_lossy().to_string())?;
|
||||
|
||||
let family_metadata_file = File::open(theme_family_dir.path().join("family.json"))
|
||||
.context(format!(
|
||||
"no `family.json` found for '{}'",
|
||||
theme_family_slug
|
||||
))?;
|
||||
|
||||
let license_file_path = theme_family_dir.path().join("LICENSE");
|
||||
|
||||
if !license_file_path.exists() {
|
||||
println!("Skipping theme family '{}' because it does not have a LICENSE file. This theme will only be imported once a LICENSE file is provided.", theme_family_slug);
|
||||
continue;
|
||||
}
|
||||
|
||||
let family_metadata: FamilyMetadata = serde_json::from_reader(family_metadata_file)
|
||||
.context(format!(
|
||||
"failed to parse `family.json` for '{theme_family_slug}'"
|
||||
))?;
|
||||
|
||||
let mut themes = Vec::new();
|
||||
|
||||
for theme_metadata in family_metadata.themes {
|
||||
let theme_file_path = theme_family_dir.path().join(&theme_metadata.file_name);
|
||||
|
||||
let theme_file = match File::open(&theme_file_path) {
|
||||
Ok(file) => file,
|
||||
Err(_) => {
|
||||
println!("Failed to open file at path: {:?}", theme_file_path);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
||||
let vscode_theme: VsCodeTheme = serde_json::from_reader(theme_file)
|
||||
.context(format!("failed to parse theme {theme_file_path:?}"))?;
|
||||
|
||||
let converter = VsCodeThemeConverter::new(vscode_theme, theme_metadata);
|
||||
|
||||
let theme = converter.convert()?;
|
||||
|
||||
themes.push(theme);
|
||||
}
|
||||
|
||||
let theme_family = ThemeFamily {
|
||||
id: uuid::Uuid::new_v4().to_string(),
|
||||
name: family_metadata.name.into(),
|
||||
author: family_metadata.author.into(),
|
||||
themes,
|
||||
scales: default_color_scales(),
|
||||
};
|
||||
|
||||
theme_families.push(theme_family);
|
||||
}
|
||||
|
||||
let themes_output_path = PathBuf::from_str(OUT_PATH)?;
|
||||
|
||||
if !themes_output_path.exists() {
|
||||
println!("Creating directory: {:?}", themes_output_path);
|
||||
fs::create_dir_all(&themes_output_path)?;
|
||||
}
|
||||
|
||||
let mut mod_rs_file = File::create(themes_output_path.join(format!("mod.rs")))?;
|
||||
|
||||
let mut theme_modules = Vec::new();
|
||||
|
||||
for theme_family in theme_families {
|
||||
let theme_family_slug = theme_family.name.to_string().to_case(Case::Snake);
|
||||
|
||||
let mut output_file =
|
||||
File::create(themes_output_path.join(format!("{theme_family_slug}.rs")))?;
|
||||
println!(
|
||||
"Creating file: {:?}",
|
||||
themes_output_path.join(format!("{theme_family_slug}.rs"))
|
||||
);
|
||||
|
||||
let theme_module = format!(
|
||||
r#"
|
||||
use gpui::rgba;
|
||||
|
||||
use crate::{{
|
||||
default_color_scales, Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors,
|
||||
SyntaxTheme, SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
}};
|
||||
|
||||
pub fn {theme_family_slug}() -> ThemeFamily {{
|
||||
{theme_family_definition}
|
||||
}}
|
||||
"#,
|
||||
theme_family_definition = format!("{:#?}", ThemeFamilyPrinter::new(theme_family))
|
||||
);
|
||||
|
||||
output_file.write_all(theme_module.as_bytes())?;
|
||||
|
||||
theme_modules.push(theme_family_slug);
|
||||
}
|
||||
|
||||
let themes_vector_contents = format!(
|
||||
r#"
|
||||
use crate::ThemeFamily;
|
||||
|
||||
pub(crate) fn all_imported_themes() -> Vec<ThemeFamily> {{
|
||||
vec![{all_themes}]
|
||||
}}
|
||||
"#,
|
||||
all_themes = theme_modules
|
||||
.iter()
|
||||
.map(|module| format!("{}()", module))
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ")
|
||||
);
|
||||
|
||||
let mod_rs_contents = format!(
|
||||
r#"
|
||||
{mod_statements}
|
||||
|
||||
{use_statements}
|
||||
|
||||
{themes_vector_contents}
|
||||
"#,
|
||||
mod_statements = theme_modules
|
||||
.iter()
|
||||
.map(|module| format!("mod {module};"))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n"),
|
||||
use_statements = theme_modules
|
||||
.iter()
|
||||
.map(|module| format!("pub use {module}::*;"))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n"),
|
||||
themes_vector_contents = themes_vector_contents
|
||||
);
|
||||
|
||||
mod_rs_file.write_all(mod_rs_contents.as_bytes())?;
|
||||
|
||||
Ok(())
|
||||
}
|
384
crates/theme_importer/src/theme_printer.rs
Normal file
384
crates/theme_importer/src/theme_printer.rs
Normal file
|
@ -0,0 +1,384 @@
|
|||
use std::fmt::{self, Debug};
|
||||
|
||||
use gpui::{Hsla, Rgba};
|
||||
use theme::{
|
||||
Appearance, GitStatusColors, PlayerColor, PlayerColors, StatusColors, SyntaxTheme,
|
||||
SystemColors, ThemeColors, ThemeFamily, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
struct RawSyntaxPrinter<'a>(&'a str);
|
||||
|
||||
impl<'a> Debug for RawSyntaxPrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
struct HslaPrinter(Hsla);
|
||||
|
||||
impl Debug for HslaPrinter {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{:?}", IntoPrinter(&Rgba::from(self.0)))
|
||||
}
|
||||
}
|
||||
|
||||
struct IntoPrinter<'a, D: Debug>(&'a D);
|
||||
|
||||
impl<'a, D: Debug> Debug for IntoPrinter<'a, D> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "{:?}.into()", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VecPrinter<'a, T>(&'a Vec<T>);
|
||||
|
||||
impl<'a, T: Debug> Debug for VecPrinter<'a, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "vec!{:?}", &self.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ThemeFamilyPrinter(ThemeFamily);
|
||||
|
||||
impl ThemeFamilyPrinter {
|
||||
pub fn new(theme_family: ThemeFamily) -> Self {
|
||||
Self(theme_family)
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for ThemeFamilyPrinter {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("ThemeFamily")
|
||||
.field("id", &IntoPrinter(&self.0.id))
|
||||
.field("name", &IntoPrinter(&self.0.name))
|
||||
.field("author", &IntoPrinter(&self.0.author))
|
||||
.field(
|
||||
"themes",
|
||||
&VecPrinter(
|
||||
&self
|
||||
.0
|
||||
.themes
|
||||
.iter()
|
||||
.map(|theme| ThemeVariantPrinter(theme))
|
||||
.collect(),
|
||||
),
|
||||
)
|
||||
.field("scales", &RawSyntaxPrinter("default_color_scales()"))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ThemeVariantPrinter<'a>(&'a ThemeVariant);
|
||||
|
||||
impl<'a> Debug for ThemeVariantPrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("ThemeVariant")
|
||||
.field("id", &IntoPrinter(&self.0.id))
|
||||
.field("name", &IntoPrinter(&self.0.name))
|
||||
.field("appearance", &AppearancePrinter(self.0.appearance))
|
||||
.field("styles", &ThemeStylesPrinter(&self.0.styles))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct AppearancePrinter(Appearance);
|
||||
|
||||
impl Debug for AppearancePrinter {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "Appearance::{:?}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ThemeStylesPrinter<'a>(&'a ThemeStyles);
|
||||
|
||||
impl<'a> Debug for ThemeStylesPrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("ThemeStyles")
|
||||
.field("system", &SystemColorsPrinter(&self.0.system))
|
||||
.field("colors", &ThemeColorsPrinter(&self.0.colors))
|
||||
.field("status", &StatusColorsPrinter(&self.0.status))
|
||||
.field("git", &GitStatusColorsPrinter(&self.0.git))
|
||||
.field("player", &PlayerColorsPrinter(&self.0.player))
|
||||
.field("syntax", &SyntaxThemePrinter(&self.0.syntax))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SystemColorsPrinter<'a>(&'a SystemColors);
|
||||
|
||||
impl<'a> Debug for SystemColorsPrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("SystemColors")
|
||||
.field("transparent", &HslaPrinter(self.0.transparent))
|
||||
.field(
|
||||
"mac_os_traffic_light_red",
|
||||
&HslaPrinter(self.0.mac_os_traffic_light_red),
|
||||
)
|
||||
.field(
|
||||
"mac_os_traffic_light_yellow",
|
||||
&HslaPrinter(self.0.mac_os_traffic_light_yellow),
|
||||
)
|
||||
.field(
|
||||
"mac_os_traffic_light_green",
|
||||
&HslaPrinter(self.0.mac_os_traffic_light_green),
|
||||
)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ThemeColorsPrinter<'a>(&'a ThemeColors);
|
||||
|
||||
impl<'a> Debug for ThemeColorsPrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("ThemeColors")
|
||||
.field("border", &HslaPrinter(self.0.border))
|
||||
.field("border_variant", &HslaPrinter(self.0.border_variant))
|
||||
.field("border_focused", &HslaPrinter(self.0.border_focused))
|
||||
.field("border_disabled", &HslaPrinter(self.0.border_disabled))
|
||||
.field("border_selected", &HslaPrinter(self.0.border_selected))
|
||||
.field(
|
||||
"border_transparent",
|
||||
&HslaPrinter(self.0.border_transparent),
|
||||
)
|
||||
.field(
|
||||
"elevated_surface_background",
|
||||
&HslaPrinter(self.0.elevated_surface_background),
|
||||
)
|
||||
.field(
|
||||
"surface_background",
|
||||
&HslaPrinter(self.0.surface_background),
|
||||
)
|
||||
.field("background", &HslaPrinter(self.0.background))
|
||||
.field(
|
||||
"element_background",
|
||||
&HslaPrinter(self.0.element_background),
|
||||
)
|
||||
.field("element_hover", &HslaPrinter(self.0.element_hover))
|
||||
.field("element_active", &HslaPrinter(self.0.element_active))
|
||||
.field("element_selected", &HslaPrinter(self.0.element_selected))
|
||||
.field("element_disabled", &HslaPrinter(self.0.element_disabled))
|
||||
.field(
|
||||
"element_placeholder",
|
||||
&HslaPrinter(self.0.element_placeholder),
|
||||
)
|
||||
.field(
|
||||
"element_drop_target",
|
||||
&HslaPrinter(self.0.element_drop_target),
|
||||
)
|
||||
.field(
|
||||
"ghost_element_background",
|
||||
&HslaPrinter(self.0.ghost_element_background),
|
||||
)
|
||||
.field(
|
||||
"ghost_element_hover",
|
||||
&HslaPrinter(self.0.ghost_element_hover),
|
||||
)
|
||||
.field(
|
||||
"ghost_element_active",
|
||||
&HslaPrinter(self.0.ghost_element_active),
|
||||
)
|
||||
.field(
|
||||
"ghost_element_selected",
|
||||
&HslaPrinter(self.0.ghost_element_selected),
|
||||
)
|
||||
.field(
|
||||
"ghost_element_disabled",
|
||||
&HslaPrinter(self.0.ghost_element_disabled),
|
||||
)
|
||||
.field("text", &HslaPrinter(self.0.text))
|
||||
.field("text_muted", &HslaPrinter(self.0.text_muted))
|
||||
.field("text_placeholder", &HslaPrinter(self.0.text_placeholder))
|
||||
.field("text_disabled", &HslaPrinter(self.0.text_disabled))
|
||||
.field("text_accent", &HslaPrinter(self.0.text_accent))
|
||||
.field("icon", &HslaPrinter(self.0.icon))
|
||||
.field("icon_muted", &HslaPrinter(self.0.icon_muted))
|
||||
.field("icon_disabled", &HslaPrinter(self.0.icon_disabled))
|
||||
.field("icon_placeholder", &HslaPrinter(self.0.icon_placeholder))
|
||||
.field("icon_accent", &HslaPrinter(self.0.icon_accent))
|
||||
.field(
|
||||
"status_bar_background",
|
||||
&HslaPrinter(self.0.status_bar_background),
|
||||
)
|
||||
.field(
|
||||
"title_bar_background",
|
||||
&HslaPrinter(self.0.title_bar_background),
|
||||
)
|
||||
.field(
|
||||
"toolbar_background",
|
||||
&HslaPrinter(self.0.toolbar_background),
|
||||
)
|
||||
.field(
|
||||
"tab_bar_background",
|
||||
&HslaPrinter(self.0.tab_bar_background),
|
||||
)
|
||||
.field(
|
||||
"tab_inactive_background",
|
||||
&HslaPrinter(self.0.tab_inactive_background),
|
||||
)
|
||||
.field(
|
||||
"tab_active_background",
|
||||
&HslaPrinter(self.0.tab_active_background),
|
||||
)
|
||||
.field("editor_background", &HslaPrinter(self.0.editor_background))
|
||||
.field(
|
||||
"editor_subheader_background",
|
||||
&HslaPrinter(self.0.editor_subheader_background),
|
||||
)
|
||||
.field(
|
||||
"editor_active_line",
|
||||
&HslaPrinter(self.0.editor_active_line),
|
||||
)
|
||||
.field(
|
||||
"terminal_background",
|
||||
&HslaPrinter(self.0.terminal_background),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_bright_black",
|
||||
&HslaPrinter(self.0.terminal_ansi_bright_black),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_bright_red",
|
||||
&HslaPrinter(self.0.terminal_ansi_bright_red),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_bright_green",
|
||||
&HslaPrinter(self.0.terminal_ansi_bright_green),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_bright_yellow",
|
||||
&HslaPrinter(self.0.terminal_ansi_bright_yellow),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_bright_blue",
|
||||
&HslaPrinter(self.0.terminal_ansi_bright_blue),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_bright_magenta",
|
||||
&HslaPrinter(self.0.terminal_ansi_bright_magenta),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_bright_cyan",
|
||||
&HslaPrinter(self.0.terminal_ansi_bright_cyan),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_bright_white",
|
||||
&HslaPrinter(self.0.terminal_ansi_bright_white),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_black",
|
||||
&HslaPrinter(self.0.terminal_ansi_black),
|
||||
)
|
||||
.field("terminal_ansi_red", &HslaPrinter(self.0.terminal_ansi_red))
|
||||
.field(
|
||||
"terminal_ansi_green",
|
||||
&HslaPrinter(self.0.terminal_ansi_green),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_yellow",
|
||||
&HslaPrinter(self.0.terminal_ansi_yellow),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_blue",
|
||||
&HslaPrinter(self.0.terminal_ansi_blue),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_magenta",
|
||||
&HslaPrinter(self.0.terminal_ansi_magenta),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_cyan",
|
||||
&HslaPrinter(self.0.terminal_ansi_cyan),
|
||||
)
|
||||
.field(
|
||||
"terminal_ansi_white",
|
||||
&HslaPrinter(self.0.terminal_ansi_white),
|
||||
)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct StatusColorsPrinter<'a>(&'a StatusColors);
|
||||
|
||||
impl<'a> Debug for StatusColorsPrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("StatusColors")
|
||||
.field("conflict", &HslaPrinter(self.0.conflict))
|
||||
.field("created", &HslaPrinter(self.0.created))
|
||||
.field("deleted", &HslaPrinter(self.0.deleted))
|
||||
.field("error", &HslaPrinter(self.0.error))
|
||||
.field("hidden", &HslaPrinter(self.0.hidden))
|
||||
.field("ignored", &HslaPrinter(self.0.ignored))
|
||||
.field("info", &HslaPrinter(self.0.info))
|
||||
.field("modified", &HslaPrinter(self.0.modified))
|
||||
.field("renamed", &HslaPrinter(self.0.renamed))
|
||||
.field("success", &HslaPrinter(self.0.success))
|
||||
.field("warning", &HslaPrinter(self.0.warning))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct GitStatusColorsPrinter<'a>(&'a GitStatusColors);
|
||||
|
||||
impl<'a> Debug for GitStatusColorsPrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("GitStatusColors")
|
||||
.field("conflict", &HslaPrinter(self.0.conflict))
|
||||
.field("created", &HslaPrinter(self.0.created))
|
||||
.field("deleted", &HslaPrinter(self.0.deleted))
|
||||
.field("ignored", &HslaPrinter(self.0.ignored))
|
||||
.field("modified", &HslaPrinter(self.0.modified))
|
||||
.field("renamed", &HslaPrinter(self.0.renamed))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PlayerColorsPrinter<'a>(&'a PlayerColors);
|
||||
|
||||
impl<'a> Debug for PlayerColorsPrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_tuple("PlayerColors")
|
||||
.field(&VecPrinter(
|
||||
&self
|
||||
.0
|
||||
.0
|
||||
.iter()
|
||||
.map(|player_color| PlayerColorPrinter(player_color))
|
||||
.collect(),
|
||||
))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PlayerColorPrinter<'a>(&'a PlayerColor);
|
||||
|
||||
impl<'a> Debug for PlayerColorPrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("PlayerColor")
|
||||
.field("cursor", &HslaPrinter(self.0.cursor))
|
||||
.field("background", &HslaPrinter(self.0.background))
|
||||
.field("selection", &HslaPrinter(self.0.selection))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SyntaxThemePrinter<'a>(&'a SyntaxTheme);
|
||||
|
||||
impl<'a> Debug for SyntaxThemePrinter<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("SyntaxTheme")
|
||||
.field(
|
||||
"highlights",
|
||||
&VecPrinter(
|
||||
&self
|
||||
.0
|
||||
.highlights
|
||||
.iter()
|
||||
.map(|(token, highlight)| {
|
||||
(IntoPrinter(token), HslaPrinter(highlight.color.unwrap()))
|
||||
})
|
||||
.collect(),
|
||||
),
|
||||
)
|
||||
.finish()
|
||||
}
|
||||
}
|
11
crates/theme_importer/src/util.rs
Normal file
11
crates/theme_importer/src/util.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
use anyhow::Result;
|
||||
|
||||
pub trait Traverse<T, U> {
|
||||
fn traverse(self, f: impl FnOnce(T) -> Result<U>) -> Result<Option<U>>;
|
||||
}
|
||||
|
||||
impl<T, U> Traverse<T, U> for Option<T> {
|
||||
fn traverse(self, f: impl FnOnce(T) -> Result<U>) -> Result<Option<U>> {
|
||||
self.map_or(Ok(None), |value| f(value).map(Some))
|
||||
}
|
||||
}
|
606
crates/theme_importer/src/vscode.rs
Normal file
606
crates/theme_importer/src/vscode.rs
Normal file
|
@ -0,0 +1,606 @@
|
|||
use anyhow::Result;
|
||||
use gpui::{Hsla, Refineable, Rgba};
|
||||
use serde::Deserialize;
|
||||
use theme::{
|
||||
Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors,
|
||||
ThemeColors, ThemeColorsRefinement, ThemeStyles, ThemeVariant,
|
||||
};
|
||||
|
||||
use crate::util::Traverse;
|
||||
use crate::ThemeMetadata;
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct VsCodeTheme {
|
||||
#[serde(rename = "$schema")]
|
||||
pub schema: Option<String>,
|
||||
pub name: Option<String>,
|
||||
pub author: Option<String>,
|
||||
pub maintainers: Option<Vec<String>>,
|
||||
#[serde(rename = "semanticClass")]
|
||||
pub semantic_class: Option<String>,
|
||||
#[serde(rename = "semanticHighlighting")]
|
||||
pub semantic_highlighting: Option<bool>,
|
||||
pub colors: VsCodeColors,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct VsCodeColors {
|
||||
#[serde(rename = "terminal.background")]
|
||||
pub terminal_background: Option<String>,
|
||||
#[serde(rename = "terminal.foreground")]
|
||||
pub terminal_foreground: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBrightBlack")]
|
||||
pub terminal_ansi_bright_black: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBrightRed")]
|
||||
pub terminal_ansi_bright_red: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBrightGreen")]
|
||||
pub terminal_ansi_bright_green: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBrightYellow")]
|
||||
pub terminal_ansi_bright_yellow: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBrightBlue")]
|
||||
pub terminal_ansi_bright_blue: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBrightMagenta")]
|
||||
pub terminal_ansi_bright_magenta: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBrightCyan")]
|
||||
pub terminal_ansi_bright_cyan: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBrightWhite")]
|
||||
pub terminal_ansi_bright_white: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBlack")]
|
||||
pub terminal_ansi_black: Option<String>,
|
||||
#[serde(rename = "terminal.ansiRed")]
|
||||
pub terminal_ansi_red: Option<String>,
|
||||
#[serde(rename = "terminal.ansiGreen")]
|
||||
pub terminal_ansi_green: Option<String>,
|
||||
#[serde(rename = "terminal.ansiYellow")]
|
||||
pub terminal_ansi_yellow: Option<String>,
|
||||
#[serde(rename = "terminal.ansiBlue")]
|
||||
pub terminal_ansi_blue: Option<String>,
|
||||
#[serde(rename = "terminal.ansiMagenta")]
|
||||
pub terminal_ansi_magenta: Option<String>,
|
||||
#[serde(rename = "terminal.ansiCyan")]
|
||||
pub terminal_ansi_cyan: Option<String>,
|
||||
#[serde(rename = "terminal.ansiWhite")]
|
||||
pub terminal_ansi_white: Option<String>,
|
||||
#[serde(rename = "focusBorder")]
|
||||
pub focus_border: Option<String>,
|
||||
pub foreground: Option<String>,
|
||||
#[serde(rename = "selection.background")]
|
||||
pub selection_background: Option<String>,
|
||||
#[serde(rename = "errorForeground")]
|
||||
pub error_foreground: Option<String>,
|
||||
#[serde(rename = "button.background")]
|
||||
pub button_background: Option<String>,
|
||||
#[serde(rename = "button.foreground")]
|
||||
pub button_foreground: Option<String>,
|
||||
#[serde(rename = "button.secondaryBackground")]
|
||||
pub button_secondary_background: Option<String>,
|
||||
#[serde(rename = "button.secondaryForeground")]
|
||||
pub button_secondary_foreground: Option<String>,
|
||||
#[serde(rename = "button.secondaryHoverBackground")]
|
||||
pub button_secondary_hover_background: Option<String>,
|
||||
#[serde(rename = "dropdown.background")]
|
||||
pub dropdown_background: Option<String>,
|
||||
#[serde(rename = "dropdown.border")]
|
||||
pub dropdown_border: Option<String>,
|
||||
#[serde(rename = "dropdown.foreground")]
|
||||
pub dropdown_foreground: Option<String>,
|
||||
#[serde(rename = "input.background")]
|
||||
pub input_background: Option<String>,
|
||||
#[serde(rename = "input.foreground")]
|
||||
pub input_foreground: Option<String>,
|
||||
#[serde(rename = "input.border")]
|
||||
pub input_border: Option<String>,
|
||||
#[serde(rename = "input.placeholderForeground")]
|
||||
pub input_placeholder_foreground: Option<String>,
|
||||
#[serde(rename = "inputOption.activeBorder")]
|
||||
pub input_option_active_border: Option<String>,
|
||||
#[serde(rename = "inputValidation.infoBorder")]
|
||||
pub input_validation_info_border: Option<String>,
|
||||
#[serde(rename = "inputValidation.warningBorder")]
|
||||
pub input_validation_warning_border: Option<String>,
|
||||
#[serde(rename = "inputValidation.errorBorder")]
|
||||
pub input_validation_error_border: Option<String>,
|
||||
#[serde(rename = "badge.foreground")]
|
||||
pub badge_foreground: Option<String>,
|
||||
#[serde(rename = "badge.background")]
|
||||
pub badge_background: Option<String>,
|
||||
#[serde(rename = "progressBar.background")]
|
||||
pub progress_bar_background: Option<String>,
|
||||
#[serde(rename = "list.activeSelectionBackground")]
|
||||
pub list_active_selection_background: Option<String>,
|
||||
#[serde(rename = "list.activeSelectionForeground")]
|
||||
pub list_active_selection_foreground: Option<String>,
|
||||
#[serde(rename = "list.dropBackground")]
|
||||
pub list_drop_background: Option<String>,
|
||||
#[serde(rename = "list.focusBackground")]
|
||||
pub list_focus_background: Option<String>,
|
||||
#[serde(rename = "list.highlightForeground")]
|
||||
pub list_highlight_foreground: Option<String>,
|
||||
#[serde(rename = "list.hoverBackground")]
|
||||
pub list_hover_background: Option<String>,
|
||||
#[serde(rename = "list.inactiveSelectionBackground")]
|
||||
pub list_inactive_selection_background: Option<String>,
|
||||
#[serde(rename = "list.warningForeground")]
|
||||
pub list_warning_foreground: Option<String>,
|
||||
#[serde(rename = "list.errorForeground")]
|
||||
pub list_error_foreground: Option<String>,
|
||||
#[serde(rename = "activityBar.background")]
|
||||
pub activity_bar_background: Option<String>,
|
||||
#[serde(rename = "activityBar.inactiveForeground")]
|
||||
pub activity_bar_inactive_foreground: Option<String>,
|
||||
#[serde(rename = "activityBar.foreground")]
|
||||
pub activity_bar_foreground: Option<String>,
|
||||
#[serde(rename = "activityBar.activeBorder")]
|
||||
pub activity_bar_active_border: Option<String>,
|
||||
#[serde(rename = "activityBar.activeBackground")]
|
||||
pub activity_bar_active_background: Option<String>,
|
||||
#[serde(rename = "activityBarBadge.background")]
|
||||
pub activity_bar_badge_background: Option<String>,
|
||||
#[serde(rename = "activityBarBadge.foreground")]
|
||||
pub activity_bar_badge_foreground: Option<String>,
|
||||
#[serde(rename = "sideBar.background")]
|
||||
pub side_bar_background: Option<String>,
|
||||
#[serde(rename = "sideBarTitle.foreground")]
|
||||
pub side_bar_title_foreground: Option<String>,
|
||||
#[serde(rename = "sideBarSectionHeader.background")]
|
||||
pub side_bar_section_header_background: Option<String>,
|
||||
#[serde(rename = "sideBarSectionHeader.border")]
|
||||
pub side_bar_section_header_border: Option<String>,
|
||||
#[serde(rename = "editorGroup.border")]
|
||||
pub editor_group_border: Option<String>,
|
||||
#[serde(rename = "editorGroup.dropBackground")]
|
||||
pub editor_group_drop_background: Option<String>,
|
||||
#[serde(rename = "editorGroupHeader.tabsBackground")]
|
||||
pub editor_group_header_tabs_background: Option<String>,
|
||||
#[serde(rename = "tab.activeBackground")]
|
||||
pub tab_active_background: Option<String>,
|
||||
#[serde(rename = "tab.activeForeground")]
|
||||
pub tab_active_foreground: Option<String>,
|
||||
#[serde(rename = "tab.border")]
|
||||
pub tab_border: Option<String>,
|
||||
#[serde(rename = "tab.activeBorderTop")]
|
||||
pub tab_active_border_top: Option<String>,
|
||||
#[serde(rename = "tab.inactiveBackground")]
|
||||
pub tab_inactive_background: Option<String>,
|
||||
#[serde(rename = "tab.inactiveForeground")]
|
||||
pub tab_inactive_foreground: Option<String>,
|
||||
#[serde(rename = "editor.foreground")]
|
||||
pub editor_foreground: Option<String>,
|
||||
#[serde(rename = "editor.background")]
|
||||
pub editor_background: Option<String>,
|
||||
#[serde(rename = "editorLineNumber.foreground")]
|
||||
pub editor_line_number_foreground: Option<String>,
|
||||
#[serde(rename = "editor.selectionBackground")]
|
||||
pub editor_selection_background: Option<String>,
|
||||
#[serde(rename = "editor.selectionHighlightBackground")]
|
||||
pub editor_selection_highlight_background: Option<String>,
|
||||
#[serde(rename = "editor.foldBackground")]
|
||||
pub editor_fold_background: Option<String>,
|
||||
#[serde(rename = "editor.wordHighlightBackground")]
|
||||
pub editor_word_highlight_background: Option<String>,
|
||||
#[serde(rename = "editor.wordHighlightStrongBackground")]
|
||||
pub editor_word_highlight_strong_background: Option<String>,
|
||||
#[serde(rename = "editor.findMatchBackground")]
|
||||
pub editor_find_match_background: Option<String>,
|
||||
#[serde(rename = "editor.findMatchHighlightBackground")]
|
||||
pub editor_find_match_highlight_background: Option<String>,
|
||||
#[serde(rename = "editor.findRangeHighlightBackground")]
|
||||
pub editor_find_range_highlight_background: Option<String>,
|
||||
#[serde(rename = "editor.hoverHighlightBackground")]
|
||||
pub editor_hover_highlight_background: Option<String>,
|
||||
#[serde(rename = "editor.lineHighlightBorder")]
|
||||
pub editor_line_highlight_border: Option<String>,
|
||||
#[serde(rename = "editorLink.activeForeground")]
|
||||
pub editor_link_active_foreground: Option<String>,
|
||||
#[serde(rename = "editor.rangeHighlightBackground")]
|
||||
pub editor_range_highlight_background: Option<String>,
|
||||
#[serde(rename = "editor.snippetTabstopHighlightBackground")]
|
||||
pub editor_snippet_tabstop_highlight_background: Option<String>,
|
||||
#[serde(rename = "editor.snippetTabstopHighlightBorder")]
|
||||
pub editor_snippet_tabstop_highlight_border: Option<String>,
|
||||
#[serde(rename = "editor.snippetFinalTabstopHighlightBackground")]
|
||||
pub editor_snippet_final_tabstop_highlight_background: Option<String>,
|
||||
#[serde(rename = "editor.snippetFinalTabstopHighlightBorder")]
|
||||
pub editor_snippet_final_tabstop_highlight_border: Option<String>,
|
||||
#[serde(rename = "editorWhitespace.foreground")]
|
||||
pub editor_whitespace_foreground: Option<String>,
|
||||
#[serde(rename = "editorIndentGuide.background")]
|
||||
pub editor_indent_guide_background: Option<String>,
|
||||
#[serde(rename = "editorIndentGuide.activeBackground")]
|
||||
pub editor_indent_guide_active_background: Option<String>,
|
||||
#[serde(rename = "editorRuler.foreground")]
|
||||
pub editor_ruler_foreground: Option<String>,
|
||||
#[serde(rename = "editorCodeLens.foreground")]
|
||||
pub editor_code_lens_foreground: Option<String>,
|
||||
#[serde(rename = "editorBracketHighlight.foreground1")]
|
||||
pub editor_bracket_highlight_foreground1: Option<String>,
|
||||
#[serde(rename = "editorBracketHighlight.foreground2")]
|
||||
pub editor_bracket_highlight_foreground2: Option<String>,
|
||||
#[serde(rename = "editorBracketHighlight.foreground3")]
|
||||
pub editor_bracket_highlight_foreground3: Option<String>,
|
||||
#[serde(rename = "editorBracketHighlight.foreground4")]
|
||||
pub editor_bracket_highlight_foreground4: Option<String>,
|
||||
#[serde(rename = "editorBracketHighlight.foreground5")]
|
||||
pub editor_bracket_highlight_foreground5: Option<String>,
|
||||
#[serde(rename = "editorBracketHighlight.foreground6")]
|
||||
pub editor_bracket_highlight_foreground6: Option<String>,
|
||||
#[serde(rename = "editorBracketHighlight.unexpectedBracket.foreground")]
|
||||
pub editor_bracket_highlight_unexpected_bracket_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.border")]
|
||||
pub editor_overview_ruler_border: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.selectionHighlightForeground")]
|
||||
pub editor_overview_ruler_selection_highlight_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.wordHighlightForeground")]
|
||||
pub editor_overview_ruler_word_highlight_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.wordHighlightStrongForeground")]
|
||||
pub editor_overview_ruler_word_highlight_strong_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.modifiedForeground")]
|
||||
pub editor_overview_ruler_modified_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.addedForeground")]
|
||||
pub editor_overview_ruler_added_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.deletedForeground")]
|
||||
pub editor_overview_ruler_deleted_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.errorForeground")]
|
||||
pub editor_overview_ruler_error_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.warningForeground")]
|
||||
pub editor_overview_ruler_warning_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.infoForeground")]
|
||||
pub editor_overview_ruler_info_foreground: Option<String>,
|
||||
#[serde(rename = "editorError.foreground")]
|
||||
pub editor_error_foreground: Option<String>,
|
||||
#[serde(rename = "editorWarning.foreground")]
|
||||
pub editor_warning_foreground: Option<String>,
|
||||
#[serde(rename = "editorGutter.modifiedBackground")]
|
||||
pub editor_gutter_modified_background: Option<String>,
|
||||
#[serde(rename = "editorGutter.addedBackground")]
|
||||
pub editor_gutter_added_background: Option<String>,
|
||||
#[serde(rename = "editorGutter.deletedBackground")]
|
||||
pub editor_gutter_deleted_background: Option<String>,
|
||||
#[serde(rename = "gitDecoration.modifiedResourceForeground")]
|
||||
pub git_decoration_modified_resource_foreground: Option<String>,
|
||||
#[serde(rename = "gitDecoration.deletedResourceForeground")]
|
||||
pub git_decoration_deleted_resource_foreground: Option<String>,
|
||||
#[serde(rename = "gitDecoration.untrackedResourceForeground")]
|
||||
pub git_decoration_untracked_resource_foreground: Option<String>,
|
||||
#[serde(rename = "gitDecoration.ignoredResourceForeground")]
|
||||
pub git_decoration_ignored_resource_foreground: Option<String>,
|
||||
#[serde(rename = "gitDecoration.conflictingResourceForeground")]
|
||||
pub git_decoration_conflicting_resource_foreground: Option<String>,
|
||||
#[serde(rename = "diffEditor.insertedTextBackground")]
|
||||
pub diff_editor_inserted_text_background: Option<String>,
|
||||
#[serde(rename = "diffEditor.removedTextBackground")]
|
||||
pub diff_editor_removed_text_background: Option<String>,
|
||||
#[serde(rename = "inlineChat.regionHighlight")]
|
||||
pub inline_chat_region_highlight: Option<String>,
|
||||
#[serde(rename = "editorWidget.background")]
|
||||
pub editor_widget_background: Option<String>,
|
||||
#[serde(rename = "editorSuggestWidget.background")]
|
||||
pub editor_suggest_widget_background: Option<String>,
|
||||
#[serde(rename = "editorSuggestWidget.foreground")]
|
||||
pub editor_suggest_widget_foreground: Option<String>,
|
||||
#[serde(rename = "editorSuggestWidget.selectedBackground")]
|
||||
pub editor_suggest_widget_selected_background: Option<String>,
|
||||
#[serde(rename = "editorHoverWidget.background")]
|
||||
pub editor_hover_widget_background: Option<String>,
|
||||
#[serde(rename = "editorHoverWidget.border")]
|
||||
pub editor_hover_widget_border: Option<String>,
|
||||
#[serde(rename = "editorMarkerNavigation.background")]
|
||||
pub editor_marker_navigation_background: Option<String>,
|
||||
#[serde(rename = "peekView.border")]
|
||||
pub peek_view_border: Option<String>,
|
||||
#[serde(rename = "peekViewEditor.background")]
|
||||
pub peek_view_editor_background: Option<String>,
|
||||
#[serde(rename = "peekViewEditor.matchHighlightBackground")]
|
||||
pub peek_view_editor_match_highlight_background: Option<String>,
|
||||
#[serde(rename = "peekViewResult.background")]
|
||||
pub peek_view_result_background: Option<String>,
|
||||
#[serde(rename = "peekViewResult.fileForeground")]
|
||||
pub peek_view_result_file_foreground: Option<String>,
|
||||
#[serde(rename = "peekViewResult.lineForeground")]
|
||||
pub peek_view_result_line_foreground: Option<String>,
|
||||
#[serde(rename = "peekViewResult.matchHighlightBackground")]
|
||||
pub peek_view_result_match_highlight_background: Option<String>,
|
||||
#[serde(rename = "peekViewResult.selectionBackground")]
|
||||
pub peek_view_result_selection_background: Option<String>,
|
||||
#[serde(rename = "peekViewResult.selectionForeground")]
|
||||
pub peek_view_result_selection_foreground: Option<String>,
|
||||
#[serde(rename = "peekViewTitle.background")]
|
||||
pub peek_view_title_background: Option<String>,
|
||||
#[serde(rename = "peekViewTitleDescription.foreground")]
|
||||
pub peek_view_title_description_foreground: Option<String>,
|
||||
#[serde(rename = "peekViewTitleLabel.foreground")]
|
||||
pub peek_view_title_label_foreground: Option<String>,
|
||||
#[serde(rename = "merge.currentHeaderBackground")]
|
||||
pub merge_current_header_background: Option<String>,
|
||||
#[serde(rename = "merge.incomingHeaderBackground")]
|
||||
pub merge_incoming_header_background: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.currentContentForeground")]
|
||||
pub editor_overview_ruler_current_content_foreground: Option<String>,
|
||||
#[serde(rename = "editorOverviewRuler.incomingContentForeground")]
|
||||
pub editor_overview_ruler_incoming_content_foreground: Option<String>,
|
||||
#[serde(rename = "panel.background")]
|
||||
pub panel_background: Option<String>,
|
||||
#[serde(rename = "panel.border")]
|
||||
pub panel_border: Option<String>,
|
||||
#[serde(rename = "panelTitle.activeBorder")]
|
||||
pub panel_title_active_border: Option<String>,
|
||||
#[serde(rename = "panelTitle.activeForeground")]
|
||||
pub panel_title_active_foreground: Option<String>,
|
||||
#[serde(rename = "panelTitle.inactiveForeground")]
|
||||
pub panel_title_inactive_foreground: Option<String>,
|
||||
#[serde(rename = "statusBar.background")]
|
||||
pub status_bar_background: Option<String>,
|
||||
#[serde(rename = "statusBar.foreground")]
|
||||
pub status_bar_foreground: Option<String>,
|
||||
#[serde(rename = "statusBar.debuggingBackground")]
|
||||
pub status_bar_debugging_background: Option<String>,
|
||||
#[serde(rename = "statusBar.debuggingForeground")]
|
||||
pub status_bar_debugging_foreground: Option<String>,
|
||||
#[serde(rename = "statusBar.noFolderBackground")]
|
||||
pub status_bar_no_folder_background: Option<String>,
|
||||
#[serde(rename = "statusBar.noFolderForeground")]
|
||||
pub status_bar_no_folder_foreground: Option<String>,
|
||||
#[serde(rename = "statusBarItem.prominentBackground")]
|
||||
pub status_bar_item_prominent_background: Option<String>,
|
||||
#[serde(rename = "statusBarItem.prominentHoverBackground")]
|
||||
pub status_bar_item_prominent_hover_background: Option<String>,
|
||||
#[serde(rename = "statusBarItem.remoteForeground")]
|
||||
pub status_bar_item_remote_foreground: Option<String>,
|
||||
#[serde(rename = "statusBarItem.remoteBackground")]
|
||||
pub status_bar_item_remote_background: Option<String>,
|
||||
#[serde(rename = "titleBar.activeBackground")]
|
||||
pub title_bar_active_background: Option<String>,
|
||||
#[serde(rename = "titleBar.activeForeground")]
|
||||
pub title_bar_active_foreground: Option<String>,
|
||||
#[serde(rename = "titleBar.inactiveBackground")]
|
||||
pub title_bar_inactive_background: Option<String>,
|
||||
#[serde(rename = "titleBar.inactiveForeground")]
|
||||
pub title_bar_inactive_foreground: Option<String>,
|
||||
#[serde(rename = "extensionButton.prominentForeground")]
|
||||
pub extension_button_prominent_foreground: Option<String>,
|
||||
#[serde(rename = "extensionButton.prominentBackground")]
|
||||
pub extension_button_prominent_background: Option<String>,
|
||||
#[serde(rename = "extensionButton.prominentHoverBackground")]
|
||||
pub extension_button_prominent_hover_background: Option<String>,
|
||||
#[serde(rename = "pickerGroup.border")]
|
||||
pub picker_group_border: Option<String>,
|
||||
#[serde(rename = "pickerGroup.foreground")]
|
||||
pub picker_group_foreground: Option<String>,
|
||||
#[serde(rename = "debugToolBar.background")]
|
||||
pub debug_tool_bar_background: Option<String>,
|
||||
#[serde(rename = "walkThrough.embeddedEditorBackground")]
|
||||
pub walk_through_embedded_editor_background: Option<String>,
|
||||
#[serde(rename = "settings.headerForeground")]
|
||||
pub settings_header_foreground: Option<String>,
|
||||
#[serde(rename = "settings.modifiedItemIndicator")]
|
||||
pub settings_modified_item_indicator: Option<String>,
|
||||
#[serde(rename = "settings.dropdownBackground")]
|
||||
pub settings_dropdown_background: Option<String>,
|
||||
#[serde(rename = "settings.dropdownForeground")]
|
||||
pub settings_dropdown_foreground: Option<String>,
|
||||
#[serde(rename = "settings.dropdownBorder")]
|
||||
pub settings_dropdown_border: Option<String>,
|
||||
#[serde(rename = "settings.checkboxBackground")]
|
||||
pub settings_checkbox_background: Option<String>,
|
||||
#[serde(rename = "settings.checkboxForeground")]
|
||||
pub settings_checkbox_foreground: Option<String>,
|
||||
#[serde(rename = "settings.checkboxBorder")]
|
||||
pub settings_checkbox_border: Option<String>,
|
||||
#[serde(rename = "settings.textInputBackground")]
|
||||
pub settings_text_input_background: Option<String>,
|
||||
#[serde(rename = "settings.textInputForeground")]
|
||||
pub settings_text_input_foreground: Option<String>,
|
||||
#[serde(rename = "settings.textInputBorder")]
|
||||
pub settings_text_input_border: Option<String>,
|
||||
#[serde(rename = "settings.numberInputBackground")]
|
||||
pub settings_number_input_background: Option<String>,
|
||||
#[serde(rename = "settings.numberInputForeground")]
|
||||
pub settings_number_input_foreground: Option<String>,
|
||||
#[serde(rename = "settings.numberInputBorder")]
|
||||
pub settings_number_input_border: Option<String>,
|
||||
#[serde(rename = "breadcrumb.foreground")]
|
||||
pub breadcrumb_foreground: Option<String>,
|
||||
#[serde(rename = "breadcrumb.background")]
|
||||
pub breadcrumb_background: Option<String>,
|
||||
#[serde(rename = "breadcrumb.focusForeground")]
|
||||
pub breadcrumb_focus_foreground: Option<String>,
|
||||
#[serde(rename = "breadcrumb.activeSelectionForeground")]
|
||||
pub breadcrumb_active_selection_foreground: Option<String>,
|
||||
#[serde(rename = "breadcrumbPicker.background")]
|
||||
pub breadcrumb_picker_background: Option<String>,
|
||||
#[serde(rename = "listFilterWidget.background")]
|
||||
pub list_filter_widget_background: Option<String>,
|
||||
#[serde(rename = "listFilterWidget.outline")]
|
||||
pub list_filter_widget_outline: Option<String>,
|
||||
#[serde(rename = "listFilterWidget.noMatchesOutline")]
|
||||
pub list_filter_widget_no_matches_outline: Option<String>,
|
||||
}
|
||||
|
||||
fn try_parse_color(color: &str) -> Result<Hsla> {
|
||||
Ok(Rgba::try_from(color)?.into())
|
||||
}
|
||||
|
||||
pub struct VsCodeThemeConverter {
|
||||
theme: VsCodeTheme,
|
||||
theme_metadata: ThemeMetadata,
|
||||
}
|
||||
|
||||
impl VsCodeThemeConverter {
|
||||
pub fn new(theme: VsCodeTheme, theme_metadata: ThemeMetadata) -> Self {
|
||||
Self {
|
||||
theme,
|
||||
theme_metadata,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn convert(self) -> Result<ThemeVariant> {
|
||||
let appearance = self.theme_metadata.appearance.into();
|
||||
|
||||
let mut theme_colors = match appearance {
|
||||
Appearance::Light => ThemeColors::default_light(),
|
||||
Appearance::Dark => ThemeColors::default_dark(),
|
||||
};
|
||||
|
||||
let vscode_colors = &self.theme.colors;
|
||||
|
||||
let theme_colors_refinements = ThemeColorsRefinement {
|
||||
border: vscode_colors
|
||||
.panel_border
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
border_variant: vscode_colors
|
||||
.panel_border
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
border_focused: vscode_colors
|
||||
.panel_border
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
border_disabled: vscode_colors
|
||||
.panel_border
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
border_selected: vscode_colors
|
||||
.panel_border
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
border_transparent: vscode_colors
|
||||
.panel_border
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
elevated_surface_background: vscode_colors
|
||||
.panel_background
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
surface_background: vscode_colors
|
||||
.panel_background
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
background: vscode_colors
|
||||
.editor_background
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
element_background: vscode_colors
|
||||
.button_background
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
text: vscode_colors
|
||||
.foreground
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
tab_active_background: vscode_colors
|
||||
.tab_active_background
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
tab_inactive_background: vscode_colors
|
||||
.tab_inactive_background
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_background: vscode_colors
|
||||
.terminal_background
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_bright_black: vscode_colors
|
||||
.terminal_ansi_bright_black
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_bright_red: vscode_colors
|
||||
.terminal_ansi_bright_red
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_bright_green: vscode_colors
|
||||
.terminal_ansi_bright_green
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_bright_yellow: vscode_colors
|
||||
.terminal_ansi_bright_yellow
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_bright_blue: vscode_colors
|
||||
.terminal_ansi_bright_blue
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_bright_magenta: vscode_colors
|
||||
.terminal_ansi_bright_magenta
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_bright_cyan: vscode_colors
|
||||
.terminal_ansi_bright_cyan
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_bright_white: vscode_colors
|
||||
.terminal_ansi_bright_white
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_black: vscode_colors
|
||||
.terminal_ansi_black
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_red: vscode_colors
|
||||
.terminal_ansi_red
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_green: vscode_colors
|
||||
.terminal_ansi_green
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_yellow: vscode_colors
|
||||
.terminal_ansi_yellow
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_blue: vscode_colors
|
||||
.terminal_ansi_blue
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_magenta: vscode_colors
|
||||
.terminal_ansi_magenta
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_cyan: vscode_colors
|
||||
.terminal_ansi_cyan
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
terminal_ansi_white: vscode_colors
|
||||
.terminal_ansi_white
|
||||
.as_ref()
|
||||
.traverse(|color| try_parse_color(&color))?,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
theme_colors.refine(&theme_colors_refinements);
|
||||
|
||||
Ok(ThemeVariant {
|
||||
id: uuid::Uuid::new_v4().to_string(),
|
||||
name: self.theme_metadata.name.into(),
|
||||
appearance,
|
||||
styles: ThemeStyles {
|
||||
system: SystemColors::default(),
|
||||
colors: theme_colors,
|
||||
status: StatusColors::default(),
|
||||
git: GitStatusColors::default(),
|
||||
player: PlayerColors::default(),
|
||||
syntax: SyntaxTheme::default_dark(),
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// #[cfg(test)]
|
||||
// mod tests {
|
||||
// use super::*;
|
||||
// use std::path::PathBuf;
|
||||
|
||||
// #[test]
|
||||
// fn test_deserialize_theme() {
|
||||
// let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
// let root_dir = manifest_dir.parent().unwrap().parent().unwrap();
|
||||
|
||||
// let mut d = root_dir.to_path_buf();
|
||||
// d.push("assets/themes/src/vsc/dracula/dracula.json");
|
||||
|
||||
// let data = std::fs::read_to_string(d).expect("Unable to read file");
|
||||
|
||||
// let result: Theme = serde_json::from_str(&data).unwrap();
|
||||
// println!("{:#?}", result);
|
||||
// }
|
||||
// }
|
|
@ -309,6 +309,10 @@ impl ListEntry {
|
|||
.group("")
|
||||
.bg(cx.theme().colors().surface_background)
|
||||
// TODO: Add focus state
|
||||
// .when(self.state == InteractionState::Focused, |this| {
|
||||
// this.border()
|
||||
// .border_color(cx.theme().colors().border_focused)
|
||||
// })
|
||||
.child(
|
||||
sized_item
|
||||
.when(self.variant == ListItemVariant::Inset, |this| this.px_2())
|
||||
|
|
|
@ -8,6 +8,7 @@ use rust_embed::RustEmbed;
|
|||
#[include = "fonts/**/*"]
|
||||
#[include = "icons/**/*"]
|
||||
#[include = "themes/**/*"]
|
||||
#[exclude = "themes/src/*"]
|
||||
#[include = "sounds/**/*"]
|
||||
#[include = "*.md"]
|
||||
#[exclude = "*.DS_Store"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue