Decouple theme license generation from TypeScript theme definitions (#3917)

This PR decouples the generation of licenses for the themes we ship from
the TypeScript theme definitions.

For now, we are embedding the license information for the themes in the
`theme_importer`, and emit a combined `LICENSES` file in the `theme`
crate whenever we import themes. This is also where we check that each
theme has a valid license.

We then use this `LICENSES` file when building up the global license
file for Zed.

This decoupling is one step towards us being able to delete the old Zed1
styles.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-01-05 13:38:12 -05:00 committed by GitHub
parent 254a52d0a1
commit c7c874a371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 10815 additions and 8565 deletions

1
Cargo.lock generated
View File

@ -7837,6 +7837,7 @@ dependencies = [
"convert_case 0.6.0", "convert_case 0.6.0",
"gpui", "gpui",
"indexmap 1.9.3", "indexmap 1.9.3",
"indoc",
"json_comments", "json_comments",
"log", "log",
"palette", "palette",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,457 +15,6 @@ pub fn one() -> UserThemeFamily {
name: "One".into(), name: "One".into(),
author: "Zed Industries".into(), author: "Zed Industries".into(),
themes: vec![ themes: vec![
UserTheme {
name: "One Light".into(),
appearance: Appearance::Light,
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border: Some(rgba(0xc9c9caff).into()),
border_variant: Some(rgba(0xdfdfe0ff).into()),
border_focused: Some(rgba(0xcbcdf6ff).into()),
border_selected: Some(rgba(0xcbcdf6ff).into()),
border_transparent: Some(rgba(0x00000000).into()),
border_disabled: Some(rgba(0xd3d3d4ff).into()),
elevated_surface_background: Some(rgba(0xebebecff).into()),
surface_background: Some(rgba(0xebebecff).into()),
background: Some(rgba(0xdcdcddff).into()),
panel_background: Some(rgba(0xebebecff).into()),
element_background: Some(rgba(0xebebecff).into()),
element_hover: Some(rgba(0xdfdfe0ff).into()),
element_active: Some(rgba(0xcacacaff).into()),
element_selected: Some(rgba(0xcacacaff).into()),
element_disabled: Some(rgba(0xebebecff).into()),
drop_target_background: Some(rgba(0x7f818880).into()),
ghost_element_background: Some(rgba(0x00000000).into()),
ghost_element_hover: Some(rgba(0xdfdfe0ff).into()),
ghost_element_active: Some(rgba(0xcacacaff).into()),
ghost_element_selected: Some(rgba(0xcacacaff).into()),
ghost_element_disabled: Some(rgba(0xebebecff).into()),
text: Some(rgba(0x383a41ff).into()),
text_muted: Some(rgba(0x7f8188ff).into()),
text_placeholder: Some(rgba(0xa1a1a3ff).into()),
text_disabled: Some(rgba(0xa1a1a3ff).into()),
text_accent: Some(rgba(0x5c79e2ff).into()),
icon: Some(rgba(0x383a41ff).into()),
icon_muted: Some(rgba(0x7f8188ff).into()),
icon_disabled: Some(rgba(0xa1a1a3ff).into()),
icon_placeholder: Some(rgba(0x7f8188ff).into()),
icon_accent: Some(rgba(0x5c79e2ff).into()),
status_bar_background: Some(rgba(0xdcdcddff).into()),
title_bar_background: Some(rgba(0xdcdcddff).into()),
toolbar_background: Some(rgba(0xfafafaff).into()),
tab_bar_background: Some(rgba(0xebebecff).into()),
tab_inactive_background: Some(rgba(0xebebecff).into()),
tab_active_background: Some(rgba(0xfafafaff).into()),
scrollbar_thumb_background: Some(rgba(0x383a414c).into()),
scrollbar_thumb_hover_background: Some(rgba(0xdfdfe0ff).into()),
scrollbar_thumb_border: Some(rgba(0xdfdfe0ff).into()),
scrollbar_track_background: Some(rgba(0x00000000).into()),
scrollbar_track_border: Some(rgba(0xeeeeeeff).into()),
editor_foreground: Some(rgba(0x383a41ff).into()),
editor_background: Some(rgba(0xfafafaff).into()),
editor_gutter_background: Some(rgba(0xfafafaff).into()),
editor_subheader_background: Some(rgba(0xebebecff).into()),
editor_active_line_background: Some(rgba(0xebebecbf).into()),
editor_highlighted_line_background: Some(rgba(0xebebecff).into()),
editor_line_number: Some(rgba(0x383a4159).into()),
editor_active_line_number: Some(rgba(0x383a41ff).into()),
editor_invisible: Some(rgba(0x7f8188ff).into()),
editor_wrap_guide: Some(rgba(0x383a410d).into()),
editor_active_wrap_guide: Some(rgba(0x383a411a).into()),
editor_document_highlight_read_background: Some(rgba(0x5c79e21a).into()),
editor_document_highlight_write_background: Some(rgba(0xa3a3a466).into()),
terminal_background: Some(rgba(0xfafafaff).into()),
terminal_ansi_bright_black: Some(rgba(0xaaaaaaff).into()),
terminal_ansi_bright_red: Some(rgba(0xf0b0a4ff).into()),
terminal_ansi_bright_green: Some(rgba(0xb2cfa9ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xf1dfc1ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb5baf2ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xcea6d3ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa4bfdbff).into()),
terminal_ansi_bright_white: Some(rgba(0x383a41ff).into()),
terminal_ansi_black: Some(rgba(0xfafafaff).into()),
terminal_ansi_red: Some(rgba(0xd36151ff).into()),
terminal_ansi_green: Some(rgba(0x669f59ff).into()),
terminal_ansi_yellow: Some(rgba(0xdec184ff).into()),
terminal_ansi_blue: Some(rgba(0x5c79e2ff).into()),
terminal_ansi_magenta: Some(rgba(0x994fa6ff).into()),
terminal_ansi_cyan: Some(rgba(0x3b82b7ff).into()),
terminal_ansi_white: Some(rgba(0x383a41ff).into()),
link_text_hover: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
status: StatusColorsRefinement {
conflict: Some(rgba(0xdec184ff).into()),
conflict_background: Some(rgba(0xfaf2e6ff).into()),
conflict_border: Some(rgba(0xf5e8d2ff).into()),
created: Some(rgba(0x669f59ff).into()),
created_background: Some(rgba(0xe0ebdcff).into()),
created_border: Some(rgba(0xc8dcc1ff).into()),
deleted: Some(rgba(0xd36151ff).into()),
deleted_background: Some(rgba(0xfbdfd9ff).into()),
deleted_border: Some(rgba(0xf6c6bdff).into()),
error: Some(rgba(0xd36151ff).into()),
error_background: Some(rgba(0xfbdfd9ff).into()),
error_border: Some(rgba(0xf6c6bdff).into()),
hidden: Some(rgba(0xa1a1a3ff).into()),
hidden_background: Some(rgba(0xdcdcddff).into()),
hidden_border: Some(rgba(0xd3d3d4ff).into()),
hint: Some(rgba(0x9295beff).into()),
hint_background: Some(rgba(0xe2e2faff).into()),
hint_border: Some(rgba(0xcbcdf6ff).into()),
ignored: Some(rgba(0x7f8188ff).into()),
ignored_background: Some(rgba(0xdcdcddff).into()),
ignored_border: Some(rgba(0xc9c9caff).into()),
info: Some(rgba(0x5c79e2ff).into()),
info_background: Some(rgba(0xe2e2faff).into()),
info_border: Some(rgba(0xcbcdf6ff).into()),
modified: Some(rgba(0xdec184ff).into()),
modified_background: Some(rgba(0xfaf2e6ff).into()),
modified_border: Some(rgba(0xf5e8d2ff).into()),
predictive: Some(rgba(0x9c9fc7ff).into()),
predictive_background: Some(rgba(0xe0ebdcff).into()),
predictive_border: Some(rgba(0xc8dcc1ff).into()),
renamed: Some(rgba(0x5c79e2ff).into()),
renamed_background: Some(rgba(0xe2e2faff).into()),
renamed_border: Some(rgba(0xcbcdf6ff).into()),
success: Some(rgba(0x669f59ff).into()),
success_background: Some(rgba(0xe0ebdcff).into()),
success_border: Some(rgba(0xc8dcc1ff).into()),
unreachable: Some(rgba(0x7f8188ff).into()),
unreachable_background: Some(rgba(0xdcdcddff).into()),
unreachable_border: Some(rgba(0xc9c9caff).into()),
warning: Some(rgba(0xdec184ff).into()),
warning_background: Some(rgba(0xfaf2e6ff).into()),
warning_border: Some(rgba(0xf5e8d2ff).into()),
..Default::default()
},
player: Some(PlayerColors(vec![
PlayerColor {
cursor: rgba(0x5c79e2ff).into(),
background: rgba(0x5c79e2ff).into(),
selection: rgba(0x5c79e23d).into(),
},
PlayerColor {
cursor: rgba(0x994fa6ff).into(),
background: rgba(0x994fa6ff).into(),
selection: rgba(0x994fa63d).into(),
},
PlayerColor {
cursor: rgba(0xad6f27ff).into(),
background: rgba(0xad6f27ff).into(),
selection: rgba(0xad6f273d).into(),
},
PlayerColor {
cursor: rgba(0xa44aabff).into(),
background: rgba(0xa44aabff).into(),
selection: rgba(0xa44aab3d).into(),
},
PlayerColor {
cursor: rgba(0x3b82b7ff).into(),
background: rgba(0x3b82b7ff).into(),
selection: rgba(0x3b82b73d).into(),
},
PlayerColor {
cursor: rgba(0xd36151ff).into(),
background: rgba(0xd36151ff).into(),
selection: rgba(0xd361513d).into(),
},
PlayerColor {
cursor: rgba(0xdec184ff).into(),
background: rgba(0xdec184ff).into(),
selection: rgba(0xdec1843d).into(),
},
PlayerColor {
cursor: rgba(0x669f59ff).into(),
background: rgba(0x669f59ff).into(),
selection: rgba(0x669f593d).into(),
},
])),
syntax: Some(UserSyntaxTheme {
highlights: vec![
(
"attribute".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"boolean".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f26ff).into()),
..Default::default()
},
),
(
"comment".into(),
UserHighlightStyle {
color: Some(rgba(0xa2a3a7ff).into()),
..Default::default()
},
),
(
"comment.doc".into(),
UserHighlightStyle {
color: Some(rgba(0x7c7e86ff).into()),
..Default::default()
},
),
(
"constant".into(),
UserHighlightStyle {
color: Some(rgba(0x669f59ff).into()),
..Default::default()
},
),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"embedded".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"emphasis".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"emphasis.strong".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f26ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"enum".into(),
UserHighlightStyle {
color: Some(rgba(0xd36050ff).into()),
..Default::default()
},
),
(
"function".into(),
UserHighlightStyle {
color: Some(rgba(0x5b79e3ff).into()),
..Default::default()
},
),
(
"hint".into(),
UserHighlightStyle {
color: Some(rgba(0x9295beff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"keyword".into(),
UserHighlightStyle {
color: Some(rgba(0xa449abff).into()),
..Default::default()
},
),
(
"label".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"link_text".into(),
UserHighlightStyle {
color: Some(rgba(0x5b79e3ff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"link_uri".into(),
UserHighlightStyle {
color: Some(rgba(0x3982b7ff).into()),
..Default::default()
},
),
(
"number".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f26ff).into()),
..Default::default()
},
),
(
"operator".into(),
UserHighlightStyle {
color: Some(rgba(0x3982b7ff).into()),
..Default::default()
},
),
(
"predictive".into(),
UserHighlightStyle {
color: Some(rgba(0x9c9fc7ff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"preproc".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"primary".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"property".into(),
UserHighlightStyle {
color: Some(rgba(0xd36050ff).into()),
..Default::default()
},
),
(
"punctuation".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"punctuation.bracket".into(),
UserHighlightStyle {
color: Some(rgba(0x4d4f52ff).into()),
..Default::default()
},
),
(
"punctuation.delimiter".into(),
UserHighlightStyle {
color: Some(rgba(0x4d4f52ff).into()),
..Default::default()
},
),
(
"punctuation.list_marker".into(),
UserHighlightStyle {
color: Some(rgba(0xd36050ff).into()),
..Default::default()
},
),
(
"punctuation.special".into(),
UserHighlightStyle {
color: Some(rgba(0xb92c46ff).into()),
..Default::default()
},
),
(
"string".into(),
UserHighlightStyle {
color: Some(rgba(0x659f58ff).into()),
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0x7c7e86ff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f27ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f27ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f27ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"text.literal".into(),
UserHighlightStyle {
color: Some(rgba(0x659f58ff).into()),
..Default::default()
},
),
(
"title".into(),
UserHighlightStyle {
color: Some(rgba(0xd36050ff).into()),
font_weight: Some(UserFontWeight(400.0)),
..Default::default()
},
),
(
"type".into(),
UserHighlightStyle {
color: Some(rgba(0x3982b7ff).into()),
..Default::default()
},
),
(
"variable".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"variable.special".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f26ff).into()),
..Default::default()
},
),
(
"variant".into(),
UserHighlightStyle {
color: Some(rgba(0x5b79e3ff).into()),
..Default::default()
},
),
],
}),
},
},
UserTheme { UserTheme {
name: "One Dark".into(), name: "One Dark".into(),
appearance: Appearance::Dark, appearance: Appearance::Dark,
@ -917,6 +466,457 @@ pub fn one() -> UserThemeFamily {
}), }),
}, },
}, },
UserTheme {
name: "One Light".into(),
appearance: Appearance::Light,
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border: Some(rgba(0xc9c9caff).into()),
border_variant: Some(rgba(0xdfdfe0ff).into()),
border_focused: Some(rgba(0xcbcdf6ff).into()),
border_selected: Some(rgba(0xcbcdf6ff).into()),
border_transparent: Some(rgba(0x00000000).into()),
border_disabled: Some(rgba(0xd3d3d4ff).into()),
elevated_surface_background: Some(rgba(0xebebecff).into()),
surface_background: Some(rgba(0xebebecff).into()),
background: Some(rgba(0xdcdcddff).into()),
panel_background: Some(rgba(0xebebecff).into()),
element_background: Some(rgba(0xebebecff).into()),
element_hover: Some(rgba(0xdfdfe0ff).into()),
element_active: Some(rgba(0xcacacaff).into()),
element_selected: Some(rgba(0xcacacaff).into()),
element_disabled: Some(rgba(0xebebecff).into()),
drop_target_background: Some(rgba(0x7f818880).into()),
ghost_element_background: Some(rgba(0x00000000).into()),
ghost_element_hover: Some(rgba(0xdfdfe0ff).into()),
ghost_element_active: Some(rgba(0xcacacaff).into()),
ghost_element_selected: Some(rgba(0xcacacaff).into()),
ghost_element_disabled: Some(rgba(0xebebecff).into()),
text: Some(rgba(0x383a41ff).into()),
text_muted: Some(rgba(0x7f8188ff).into()),
text_placeholder: Some(rgba(0xa1a1a3ff).into()),
text_disabled: Some(rgba(0xa1a1a3ff).into()),
text_accent: Some(rgba(0x5c79e2ff).into()),
icon: Some(rgba(0x383a41ff).into()),
icon_muted: Some(rgba(0x7f8188ff).into()),
icon_disabled: Some(rgba(0xa1a1a3ff).into()),
icon_placeholder: Some(rgba(0x7f8188ff).into()),
icon_accent: Some(rgba(0x5c79e2ff).into()),
status_bar_background: Some(rgba(0xdcdcddff).into()),
title_bar_background: Some(rgba(0xdcdcddff).into()),
toolbar_background: Some(rgba(0xfafafaff).into()),
tab_bar_background: Some(rgba(0xebebecff).into()),
tab_inactive_background: Some(rgba(0xebebecff).into()),
tab_active_background: Some(rgba(0xfafafaff).into()),
scrollbar_thumb_background: Some(rgba(0x383a414c).into()),
scrollbar_thumb_hover_background: Some(rgba(0xdfdfe0ff).into()),
scrollbar_thumb_border: Some(rgba(0xdfdfe0ff).into()),
scrollbar_track_background: Some(rgba(0x00000000).into()),
scrollbar_track_border: Some(rgba(0xeeeeeeff).into()),
editor_foreground: Some(rgba(0x383a41ff).into()),
editor_background: Some(rgba(0xfafafaff).into()),
editor_gutter_background: Some(rgba(0xfafafaff).into()),
editor_subheader_background: Some(rgba(0xebebecff).into()),
editor_active_line_background: Some(rgba(0xebebecbf).into()),
editor_highlighted_line_background: Some(rgba(0xebebecff).into()),
editor_line_number: Some(rgba(0x383a4159).into()),
editor_active_line_number: Some(rgba(0x383a41ff).into()),
editor_invisible: Some(rgba(0x7f8188ff).into()),
editor_wrap_guide: Some(rgba(0x383a410d).into()),
editor_active_wrap_guide: Some(rgba(0x383a411a).into()),
editor_document_highlight_read_background: Some(rgba(0x5c79e21a).into()),
editor_document_highlight_write_background: Some(rgba(0xa3a3a466).into()),
terminal_background: Some(rgba(0xfafafaff).into()),
terminal_ansi_bright_black: Some(rgba(0xaaaaaaff).into()),
terminal_ansi_bright_red: Some(rgba(0xf0b0a4ff).into()),
terminal_ansi_bright_green: Some(rgba(0xb2cfa9ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xf1dfc1ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xb5baf2ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xcea6d3ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa4bfdbff).into()),
terminal_ansi_bright_white: Some(rgba(0x383a41ff).into()),
terminal_ansi_black: Some(rgba(0xfafafaff).into()),
terminal_ansi_red: Some(rgba(0xd36151ff).into()),
terminal_ansi_green: Some(rgba(0x669f59ff).into()),
terminal_ansi_yellow: Some(rgba(0xdec184ff).into()),
terminal_ansi_blue: Some(rgba(0x5c79e2ff).into()),
terminal_ansi_magenta: Some(rgba(0x994fa6ff).into()),
terminal_ansi_cyan: Some(rgba(0x3b82b7ff).into()),
terminal_ansi_white: Some(rgba(0x383a41ff).into()),
link_text_hover: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
status: StatusColorsRefinement {
conflict: Some(rgba(0xdec184ff).into()),
conflict_background: Some(rgba(0xfaf2e6ff).into()),
conflict_border: Some(rgba(0xf5e8d2ff).into()),
created: Some(rgba(0x669f59ff).into()),
created_background: Some(rgba(0xe0ebdcff).into()),
created_border: Some(rgba(0xc8dcc1ff).into()),
deleted: Some(rgba(0xd36151ff).into()),
deleted_background: Some(rgba(0xfbdfd9ff).into()),
deleted_border: Some(rgba(0xf6c6bdff).into()),
error: Some(rgba(0xd36151ff).into()),
error_background: Some(rgba(0xfbdfd9ff).into()),
error_border: Some(rgba(0xf6c6bdff).into()),
hidden: Some(rgba(0xa1a1a3ff).into()),
hidden_background: Some(rgba(0xdcdcddff).into()),
hidden_border: Some(rgba(0xd3d3d4ff).into()),
hint: Some(rgba(0x9295beff).into()),
hint_background: Some(rgba(0xe2e2faff).into()),
hint_border: Some(rgba(0xcbcdf6ff).into()),
ignored: Some(rgba(0x7f8188ff).into()),
ignored_background: Some(rgba(0xdcdcddff).into()),
ignored_border: Some(rgba(0xc9c9caff).into()),
info: Some(rgba(0x5c79e2ff).into()),
info_background: Some(rgba(0xe2e2faff).into()),
info_border: Some(rgba(0xcbcdf6ff).into()),
modified: Some(rgba(0xdec184ff).into()),
modified_background: Some(rgba(0xfaf2e6ff).into()),
modified_border: Some(rgba(0xf5e8d2ff).into()),
predictive: Some(rgba(0x9c9fc7ff).into()),
predictive_background: Some(rgba(0xe0ebdcff).into()),
predictive_border: Some(rgba(0xc8dcc1ff).into()),
renamed: Some(rgba(0x5c79e2ff).into()),
renamed_background: Some(rgba(0xe2e2faff).into()),
renamed_border: Some(rgba(0xcbcdf6ff).into()),
success: Some(rgba(0x669f59ff).into()),
success_background: Some(rgba(0xe0ebdcff).into()),
success_border: Some(rgba(0xc8dcc1ff).into()),
unreachable: Some(rgba(0x7f8188ff).into()),
unreachable_background: Some(rgba(0xdcdcddff).into()),
unreachable_border: Some(rgba(0xc9c9caff).into()),
warning: Some(rgba(0xdec184ff).into()),
warning_background: Some(rgba(0xfaf2e6ff).into()),
warning_border: Some(rgba(0xf5e8d2ff).into()),
..Default::default()
},
player: Some(PlayerColors(vec![
PlayerColor {
cursor: rgba(0x5c79e2ff).into(),
background: rgba(0x5c79e2ff).into(),
selection: rgba(0x5c79e23d).into(),
},
PlayerColor {
cursor: rgba(0x994fa6ff).into(),
background: rgba(0x994fa6ff).into(),
selection: rgba(0x994fa63d).into(),
},
PlayerColor {
cursor: rgba(0xad6f27ff).into(),
background: rgba(0xad6f27ff).into(),
selection: rgba(0xad6f273d).into(),
},
PlayerColor {
cursor: rgba(0xa44aabff).into(),
background: rgba(0xa44aabff).into(),
selection: rgba(0xa44aab3d).into(),
},
PlayerColor {
cursor: rgba(0x3b82b7ff).into(),
background: rgba(0x3b82b7ff).into(),
selection: rgba(0x3b82b73d).into(),
},
PlayerColor {
cursor: rgba(0xd36151ff).into(),
background: rgba(0xd36151ff).into(),
selection: rgba(0xd361513d).into(),
},
PlayerColor {
cursor: rgba(0xdec184ff).into(),
background: rgba(0xdec184ff).into(),
selection: rgba(0xdec1843d).into(),
},
PlayerColor {
cursor: rgba(0x669f59ff).into(),
background: rgba(0x669f59ff).into(),
selection: rgba(0x669f593d).into(),
},
])),
syntax: Some(UserSyntaxTheme {
highlights: vec![
(
"attribute".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"boolean".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f26ff).into()),
..Default::default()
},
),
(
"comment".into(),
UserHighlightStyle {
color: Some(rgba(0xa2a3a7ff).into()),
..Default::default()
},
),
(
"comment.doc".into(),
UserHighlightStyle {
color: Some(rgba(0x7c7e86ff).into()),
..Default::default()
},
),
(
"constant".into(),
UserHighlightStyle {
color: Some(rgba(0x669f59ff).into()),
..Default::default()
},
),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"embedded".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"emphasis".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"emphasis.strong".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f26ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"enum".into(),
UserHighlightStyle {
color: Some(rgba(0xd36050ff).into()),
..Default::default()
},
),
(
"function".into(),
UserHighlightStyle {
color: Some(rgba(0x5b79e3ff).into()),
..Default::default()
},
),
(
"hint".into(),
UserHighlightStyle {
color: Some(rgba(0x9295beff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"keyword".into(),
UserHighlightStyle {
color: Some(rgba(0xa449abff).into()),
..Default::default()
},
),
(
"label".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"link_text".into(),
UserHighlightStyle {
color: Some(rgba(0x5b79e3ff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"link_uri".into(),
UserHighlightStyle {
color: Some(rgba(0x3982b7ff).into()),
..Default::default()
},
),
(
"number".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f26ff).into()),
..Default::default()
},
),
(
"operator".into(),
UserHighlightStyle {
color: Some(rgba(0x3982b7ff).into()),
..Default::default()
},
),
(
"predictive".into(),
UserHighlightStyle {
color: Some(rgba(0x9c9fc7ff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"preproc".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"primary".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"property".into(),
UserHighlightStyle {
color: Some(rgba(0xd36050ff).into()),
..Default::default()
},
),
(
"punctuation".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"punctuation.bracket".into(),
UserHighlightStyle {
color: Some(rgba(0x4d4f52ff).into()),
..Default::default()
},
),
(
"punctuation.delimiter".into(),
UserHighlightStyle {
color: Some(rgba(0x4d4f52ff).into()),
..Default::default()
},
),
(
"punctuation.list_marker".into(),
UserHighlightStyle {
color: Some(rgba(0xd36050ff).into()),
..Default::default()
},
),
(
"punctuation.special".into(),
UserHighlightStyle {
color: Some(rgba(0xb92c46ff).into()),
..Default::default()
},
),
(
"string".into(),
UserHighlightStyle {
color: Some(rgba(0x659f58ff).into()),
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0x7c7e86ff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f27ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f27ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f27ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
color: Some(rgba(0x5c79e2ff).into()),
..Default::default()
},
),
(
"text.literal".into(),
UserHighlightStyle {
color: Some(rgba(0x659f58ff).into()),
..Default::default()
},
),
(
"title".into(),
UserHighlightStyle {
color: Some(rgba(0xd36050ff).into()),
font_weight: Some(UserFontWeight(400.0)),
..Default::default()
},
),
(
"type".into(),
UserHighlightStyle {
color: Some(rgba(0x3982b7ff).into()),
..Default::default()
},
),
(
"variable".into(),
UserHighlightStyle {
color: Some(rgba(0x383a41ff).into()),
..Default::default()
},
),
(
"variable.special".into(),
UserHighlightStyle {
color: Some(rgba(0xad6f26ff).into()),
..Default::default()
},
),
(
"variant".into(),
UserHighlightStyle {
color: Some(rgba(0x5b79e3ff).into()),
..Default::default()
},
),
],
}),
},
},
], ],
} }
} }

View File

@ -15,6 +15,464 @@ pub fn rose_pine() -> UserThemeFamily {
name: "Rosé Pine".into(), name: "Rosé Pine".into(),
author: "Zed Industries".into(), author: "Zed Industries".into(),
themes: vec![ themes: vec![
UserTheme {
name: "Rosé Pine".into(),
appearance: Appearance::Dark,
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border: Some(rgba(0x423f55ff).into()),
border_variant: Some(rgba(0x232132ff).into()),
border_focused: Some(rgba(0x435255ff).into()),
border_selected: Some(rgba(0x435255ff).into()),
border_transparent: Some(rgba(0x00000000).into()),
border_disabled: Some(rgba(0x353347ff).into()),
elevated_surface_background: Some(rgba(0x1d1b2aff).into()),
surface_background: Some(rgba(0x1d1b2aff).into()),
background: Some(rgba(0x292739ff).into()),
panel_background: Some(rgba(0x1d1b2aff).into()),
element_background: Some(rgba(0x1d1b2aff).into()),
element_hover: Some(rgba(0x232132ff).into()),
element_active: Some(rgba(0x403e53ff).into()),
element_selected: Some(rgba(0x403e53ff).into()),
element_disabled: Some(rgba(0x1d1b2aff).into()),
drop_target_background: Some(rgba(0x75718e80).into()),
ghost_element_background: Some(rgba(0x00000000).into()),
ghost_element_hover: Some(rgba(0x232132ff).into()),
ghost_element_active: Some(rgba(0x403e53ff).into()),
ghost_element_selected: Some(rgba(0x403e53ff).into()),
ghost_element_disabled: Some(rgba(0x1d1b2aff).into()),
text: Some(rgba(0xe0def4ff).into()),
text_muted: Some(rgba(0x75718eff).into()),
text_placeholder: Some(rgba(0x2f2b43ff).into()),
text_disabled: Some(rgba(0x2f2b43ff).into()),
text_accent: Some(rgba(0x9cced7ff).into()),
icon: Some(rgba(0xe0def4ff).into()),
icon_muted: Some(rgba(0x75718eff).into()),
icon_disabled: Some(rgba(0x2f2b43ff).into()),
icon_placeholder: Some(rgba(0x75718eff).into()),
icon_accent: Some(rgba(0x9cced7ff).into()),
status_bar_background: Some(rgba(0x292739ff).into()),
title_bar_background: Some(rgba(0x292739ff).into()),
toolbar_background: Some(rgba(0x191724ff).into()),
tab_bar_background: Some(rgba(0x1d1b2aff).into()),
tab_inactive_background: Some(rgba(0x1d1b2aff).into()),
tab_active_background: Some(rgba(0x191724ff).into()),
scrollbar_thumb_background: Some(rgba(0xe0def44c).into()),
scrollbar_thumb_hover_background: Some(rgba(0x232132ff).into()),
scrollbar_thumb_border: Some(rgba(0x232132ff).into()),
scrollbar_track_background: Some(rgba(0x00000000).into()),
scrollbar_track_border: Some(rgba(0x1c1a29ff).into()),
editor_foreground: Some(rgba(0xe0def4ff).into()),
editor_background: Some(rgba(0x191724ff).into()),
editor_gutter_background: Some(rgba(0x191724ff).into()),
editor_subheader_background: Some(rgba(0x1d1b2aff).into()),
editor_active_line_background: Some(rgba(0x1d1b2abf).into()),
editor_highlighted_line_background: Some(rgba(0x1d1b2aff).into()),
editor_line_number: Some(rgba(0xe0def459).into()),
editor_active_line_number: Some(rgba(0xe0def4ff).into()),
editor_invisible: Some(rgba(0x75718eff).into()),
editor_wrap_guide: Some(rgba(0xe0def40d).into()),
editor_active_wrap_guide: Some(rgba(0xe0def41a).into()),
editor_document_highlight_read_background: Some(rgba(0x9cced71a).into()),
editor_document_highlight_write_background: Some(rgba(0x28253c66).into()),
terminal_background: Some(rgba(0x191724ff).into()),
terminal_ansi_bright_black: Some(rgba(0x403d55ff).into()),
terminal_ansi_bright_red: Some(rgba(0x7e3647ff).into()),
terminal_ansi_bright_green: Some(rgba(0x31614fff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x8a653bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x566c70ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x4c3b47ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x203a46ff).into()),
terminal_ansi_bright_white: Some(rgba(0xe0def4ff).into()),
terminal_ansi_black: Some(rgba(0x191724ff).into()),
terminal_ansi_red: Some(rgba(0xea6f92ff).into()),
terminal_ansi_green: Some(rgba(0x5dc2a3ff).into()),
terminal_ansi_yellow: Some(rgba(0xf5c177ff).into()),
terminal_ansi_blue: Some(rgba(0x9cced7ff).into()),
terminal_ansi_magenta: Some(rgba(0x9d7691ff).into()),
terminal_ansi_cyan: Some(rgba(0x32748fff).into()),
terminal_ansi_white: Some(rgba(0xe0def4ff).into()),
link_text_hover: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
status: StatusColorsRefinement {
conflict: Some(rgba(0xf5c177ff).into()),
conflict_background: Some(rgba(0x50341aff).into()),
conflict_border: Some(rgba(0x6d4d2bff).into()),
created: Some(rgba(0x5dc2a3ff).into()),
created_background: Some(rgba(0x182e23ff).into()),
created_border: Some(rgba(0x254839ff).into()),
deleted: Some(rgba(0xea6f92ff).into()),
deleted_background: Some(rgba(0x431820ff).into()),
deleted_border: Some(rgba(0x612834ff).into()),
error: Some(rgba(0xea6f92ff).into()),
error_background: Some(rgba(0x431820ff).into()),
error_border: Some(rgba(0x612834ff).into()),
hidden: Some(rgba(0x2f2b43ff).into()),
hidden_background: Some(rgba(0x292739ff).into()),
hidden_border: Some(rgba(0x353347ff).into()),
hint: Some(rgba(0x5e768cff).into()),
hint_background: Some(rgba(0x2f3739ff).into()),
hint_border: Some(rgba(0x435255ff).into()),
ignored: Some(rgba(0x75718eff).into()),
ignored_background: Some(rgba(0x292739ff).into()),
ignored_border: Some(rgba(0x423f55ff).into()),
info: Some(rgba(0x9cced7ff).into()),
info_background: Some(rgba(0x2f3739ff).into()),
info_border: Some(rgba(0x435255ff).into()),
modified: Some(rgba(0xf5c177ff).into()),
modified_background: Some(rgba(0x50341aff).into()),
modified_border: Some(rgba(0x6d4d2bff).into()),
predictive: Some(rgba(0x556b81ff).into()),
predictive_background: Some(rgba(0x182e23ff).into()),
predictive_border: Some(rgba(0x254839ff).into()),
renamed: Some(rgba(0x9cced7ff).into()),
renamed_background: Some(rgba(0x2f3739ff).into()),
renamed_border: Some(rgba(0x435255ff).into()),
success: Some(rgba(0x5dc2a3ff).into()),
success_background: Some(rgba(0x182e23ff).into()),
success_border: Some(rgba(0x254839ff).into()),
unreachable: Some(rgba(0x75718eff).into()),
unreachable_background: Some(rgba(0x292739ff).into()),
unreachable_border: Some(rgba(0x423f55ff).into()),
warning: Some(rgba(0xf5c177ff).into()),
warning_background: Some(rgba(0x50341aff).into()),
warning_border: Some(rgba(0x6d4d2bff).into()),
..Default::default()
},
player: Some(PlayerColors(vec![
PlayerColor {
cursor: rgba(0x9cced7ff).into(),
background: rgba(0x9cced7ff).into(),
selection: rgba(0x9cced73d).into(),
},
PlayerColor {
cursor: rgba(0x9d7691ff).into(),
background: rgba(0x9d7691ff).into(),
selection: rgba(0x9d76913d).into(),
},
PlayerColor {
cursor: rgba(0xc4a7e6ff).into(),
background: rgba(0xc4a7e6ff).into(),
selection: rgba(0xc4a7e63d).into(),
},
PlayerColor {
cursor: rgba(0xc4a7e6ff).into(),
background: rgba(0xc4a7e6ff).into(),
selection: rgba(0xc4a7e63d).into(),
},
PlayerColor {
cursor: rgba(0x32748fff).into(),
background: rgba(0x32748fff).into(),
selection: rgba(0x32748f3d).into(),
},
PlayerColor {
cursor: rgba(0xea6f92ff).into(),
background: rgba(0xea6f92ff).into(),
selection: rgba(0xea6f923d).into(),
},
PlayerColor {
cursor: rgba(0xf5c177ff).into(),
background: rgba(0xf5c177ff).into(),
selection: rgba(0xf5c1773d).into(),
},
PlayerColor {
cursor: rgba(0x5dc2a3ff).into(),
background: rgba(0x5dc2a3ff).into(),
selection: rgba(0x5dc2a33d).into(),
},
])),
syntax: Some(UserSyntaxTheme {
highlights: vec![
(
"attribute".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"boolean".into(),
UserHighlightStyle {
color: Some(rgba(0xebbcbaff).into()),
..Default::default()
},
),
(
"comment".into(),
UserHighlightStyle {
color: Some(rgba(0x6e6a86ff).into()),
..Default::default()
},
),
(
"comment.doc".into(),
UserHighlightStyle {
color: Some(rgba(0x777390ff).into()),
..Default::default()
},
),
(
"constant".into(),
UserHighlightStyle {
color: Some(rgba(0x5dc2a3ff).into()),
..Default::default()
},
),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"embedded".into(),
UserHighlightStyle {
color: Some(rgba(0xe0def4ff).into()),
..Default::default()
},
),
(
"emphasis".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"emphasis.strong".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"enum".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"function".into(),
UserHighlightStyle {
color: Some(rgba(0xebbcbaff).into()),
..Default::default()
},
),
(
"function.method".into(),
UserHighlightStyle {
color: Some(rgba(0xebbcbaff).into()),
..Default::default()
},
),
(
"hint".into(),
UserHighlightStyle {
color: Some(rgba(0x5e768cff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"keyword".into(),
UserHighlightStyle {
color: Some(rgba(0x31748fff).into()),
..Default::default()
},
),
(
"label".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"link_text".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
font_style: Some(UserFontStyle::Normal),
..Default::default()
},
),
(
"link_uri".into(),
UserHighlightStyle {
color: Some(rgba(0xebbcbaff).into()),
..Default::default()
},
),
(
"number".into(),
UserHighlightStyle {
color: Some(rgba(0x5dc2a3ff).into()),
..Default::default()
},
),
(
"operator".into(),
UserHighlightStyle {
color: Some(rgba(0x31748fff).into()),
..Default::default()
},
),
(
"predictive".into(),
UserHighlightStyle {
color: Some(rgba(0x556b81ff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"preproc".into(),
UserHighlightStyle {
color: Some(rgba(0xe0def4ff).into()),
..Default::default()
},
),
(
"primary".into(),
UserHighlightStyle {
color: Some(rgba(0xe0def4ff).into()),
..Default::default()
},
),
(
"property".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"punctuation".into(),
UserHighlightStyle {
color: Some(rgba(0x908caaff).into()),
..Default::default()
},
),
(
"punctuation.bracket".into(),
UserHighlightStyle {
color: Some(rgba(0x9d99b6ff).into()),
..Default::default()
},
),
(
"punctuation.delimiter".into(),
UserHighlightStyle {
color: Some(rgba(0x9d99b6ff).into()),
..Default::default()
},
),
(
"punctuation.list_marker".into(),
UserHighlightStyle {
color: Some(rgba(0x9d99b6ff).into()),
..Default::default()
},
),
(
"punctuation.special".into(),
UserHighlightStyle {
color: Some(rgba(0x9d99b6ff).into()),
..Default::default()
},
),
(
"string".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0x777390ff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
..Default::default()
},
),
(
"text.literal".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"title".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"type".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
..Default::default()
},
),
(
"type.builtin".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
..Default::default()
},
),
(
"variable".into(),
UserHighlightStyle {
color: Some(rgba(0xe0def4ff).into()),
..Default::default()
},
),
(
"variant".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
],
}),
},
},
UserTheme { UserTheme {
name: "Rosé Pine Dawn".into(), name: "Rosé Pine Dawn".into(),
appearance: Appearance::Light, appearance: Appearance::Light,
@ -931,464 +1389,6 @@ pub fn rose_pine() -> UserThemeFamily {
}), }),
}, },
}, },
UserTheme {
name: "Rosé Pine".into(),
appearance: Appearance::Dark,
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border: Some(rgba(0x423f55ff).into()),
border_variant: Some(rgba(0x232132ff).into()),
border_focused: Some(rgba(0x435255ff).into()),
border_selected: Some(rgba(0x435255ff).into()),
border_transparent: Some(rgba(0x00000000).into()),
border_disabled: Some(rgba(0x353347ff).into()),
elevated_surface_background: Some(rgba(0x1d1b2aff).into()),
surface_background: Some(rgba(0x1d1b2aff).into()),
background: Some(rgba(0x292739ff).into()),
panel_background: Some(rgba(0x1d1b2aff).into()),
element_background: Some(rgba(0x1d1b2aff).into()),
element_hover: Some(rgba(0x232132ff).into()),
element_active: Some(rgba(0x403e53ff).into()),
element_selected: Some(rgba(0x403e53ff).into()),
element_disabled: Some(rgba(0x1d1b2aff).into()),
drop_target_background: Some(rgba(0x75718e80).into()),
ghost_element_background: Some(rgba(0x00000000).into()),
ghost_element_hover: Some(rgba(0x232132ff).into()),
ghost_element_active: Some(rgba(0x403e53ff).into()),
ghost_element_selected: Some(rgba(0x403e53ff).into()),
ghost_element_disabled: Some(rgba(0x1d1b2aff).into()),
text: Some(rgba(0xe0def4ff).into()),
text_muted: Some(rgba(0x75718eff).into()),
text_placeholder: Some(rgba(0x2f2b43ff).into()),
text_disabled: Some(rgba(0x2f2b43ff).into()),
text_accent: Some(rgba(0x9cced7ff).into()),
icon: Some(rgba(0xe0def4ff).into()),
icon_muted: Some(rgba(0x75718eff).into()),
icon_disabled: Some(rgba(0x2f2b43ff).into()),
icon_placeholder: Some(rgba(0x75718eff).into()),
icon_accent: Some(rgba(0x9cced7ff).into()),
status_bar_background: Some(rgba(0x292739ff).into()),
title_bar_background: Some(rgba(0x292739ff).into()),
toolbar_background: Some(rgba(0x191724ff).into()),
tab_bar_background: Some(rgba(0x1d1b2aff).into()),
tab_inactive_background: Some(rgba(0x1d1b2aff).into()),
tab_active_background: Some(rgba(0x191724ff).into()),
scrollbar_thumb_background: Some(rgba(0xe0def44c).into()),
scrollbar_thumb_hover_background: Some(rgba(0x232132ff).into()),
scrollbar_thumb_border: Some(rgba(0x232132ff).into()),
scrollbar_track_background: Some(rgba(0x00000000).into()),
scrollbar_track_border: Some(rgba(0x1c1a29ff).into()),
editor_foreground: Some(rgba(0xe0def4ff).into()),
editor_background: Some(rgba(0x191724ff).into()),
editor_gutter_background: Some(rgba(0x191724ff).into()),
editor_subheader_background: Some(rgba(0x1d1b2aff).into()),
editor_active_line_background: Some(rgba(0x1d1b2abf).into()),
editor_highlighted_line_background: Some(rgba(0x1d1b2aff).into()),
editor_line_number: Some(rgba(0xe0def459).into()),
editor_active_line_number: Some(rgba(0xe0def4ff).into()),
editor_invisible: Some(rgba(0x75718eff).into()),
editor_wrap_guide: Some(rgba(0xe0def40d).into()),
editor_active_wrap_guide: Some(rgba(0xe0def41a).into()),
editor_document_highlight_read_background: Some(rgba(0x9cced71a).into()),
editor_document_highlight_write_background: Some(rgba(0x28253c66).into()),
terminal_background: Some(rgba(0x191724ff).into()),
terminal_ansi_bright_black: Some(rgba(0x403d55ff).into()),
terminal_ansi_bright_red: Some(rgba(0x7e3647ff).into()),
terminal_ansi_bright_green: Some(rgba(0x31614fff).into()),
terminal_ansi_bright_yellow: Some(rgba(0x8a653bff).into()),
terminal_ansi_bright_blue: Some(rgba(0x566c70ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0x4c3b47ff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x203a46ff).into()),
terminal_ansi_bright_white: Some(rgba(0xe0def4ff).into()),
terminal_ansi_black: Some(rgba(0x191724ff).into()),
terminal_ansi_red: Some(rgba(0xea6f92ff).into()),
terminal_ansi_green: Some(rgba(0x5dc2a3ff).into()),
terminal_ansi_yellow: Some(rgba(0xf5c177ff).into()),
terminal_ansi_blue: Some(rgba(0x9cced7ff).into()),
terminal_ansi_magenta: Some(rgba(0x9d7691ff).into()),
terminal_ansi_cyan: Some(rgba(0x32748fff).into()),
terminal_ansi_white: Some(rgba(0xe0def4ff).into()),
link_text_hover: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
status: StatusColorsRefinement {
conflict: Some(rgba(0xf5c177ff).into()),
conflict_background: Some(rgba(0x50341aff).into()),
conflict_border: Some(rgba(0x6d4d2bff).into()),
created: Some(rgba(0x5dc2a3ff).into()),
created_background: Some(rgba(0x182e23ff).into()),
created_border: Some(rgba(0x254839ff).into()),
deleted: Some(rgba(0xea6f92ff).into()),
deleted_background: Some(rgba(0x431820ff).into()),
deleted_border: Some(rgba(0x612834ff).into()),
error: Some(rgba(0xea6f92ff).into()),
error_background: Some(rgba(0x431820ff).into()),
error_border: Some(rgba(0x612834ff).into()),
hidden: Some(rgba(0x2f2b43ff).into()),
hidden_background: Some(rgba(0x292739ff).into()),
hidden_border: Some(rgba(0x353347ff).into()),
hint: Some(rgba(0x5e768cff).into()),
hint_background: Some(rgba(0x2f3739ff).into()),
hint_border: Some(rgba(0x435255ff).into()),
ignored: Some(rgba(0x75718eff).into()),
ignored_background: Some(rgba(0x292739ff).into()),
ignored_border: Some(rgba(0x423f55ff).into()),
info: Some(rgba(0x9cced7ff).into()),
info_background: Some(rgba(0x2f3739ff).into()),
info_border: Some(rgba(0x435255ff).into()),
modified: Some(rgba(0xf5c177ff).into()),
modified_background: Some(rgba(0x50341aff).into()),
modified_border: Some(rgba(0x6d4d2bff).into()),
predictive: Some(rgba(0x556b81ff).into()),
predictive_background: Some(rgba(0x182e23ff).into()),
predictive_border: Some(rgba(0x254839ff).into()),
renamed: Some(rgba(0x9cced7ff).into()),
renamed_background: Some(rgba(0x2f3739ff).into()),
renamed_border: Some(rgba(0x435255ff).into()),
success: Some(rgba(0x5dc2a3ff).into()),
success_background: Some(rgba(0x182e23ff).into()),
success_border: Some(rgba(0x254839ff).into()),
unreachable: Some(rgba(0x75718eff).into()),
unreachable_background: Some(rgba(0x292739ff).into()),
unreachable_border: Some(rgba(0x423f55ff).into()),
warning: Some(rgba(0xf5c177ff).into()),
warning_background: Some(rgba(0x50341aff).into()),
warning_border: Some(rgba(0x6d4d2bff).into()),
..Default::default()
},
player: Some(PlayerColors(vec![
PlayerColor {
cursor: rgba(0x9cced7ff).into(),
background: rgba(0x9cced7ff).into(),
selection: rgba(0x9cced73d).into(),
},
PlayerColor {
cursor: rgba(0x9d7691ff).into(),
background: rgba(0x9d7691ff).into(),
selection: rgba(0x9d76913d).into(),
},
PlayerColor {
cursor: rgba(0xc4a7e6ff).into(),
background: rgba(0xc4a7e6ff).into(),
selection: rgba(0xc4a7e63d).into(),
},
PlayerColor {
cursor: rgba(0xc4a7e6ff).into(),
background: rgba(0xc4a7e6ff).into(),
selection: rgba(0xc4a7e63d).into(),
},
PlayerColor {
cursor: rgba(0x32748fff).into(),
background: rgba(0x32748fff).into(),
selection: rgba(0x32748f3d).into(),
},
PlayerColor {
cursor: rgba(0xea6f92ff).into(),
background: rgba(0xea6f92ff).into(),
selection: rgba(0xea6f923d).into(),
},
PlayerColor {
cursor: rgba(0xf5c177ff).into(),
background: rgba(0xf5c177ff).into(),
selection: rgba(0xf5c1773d).into(),
},
PlayerColor {
cursor: rgba(0x5dc2a3ff).into(),
background: rgba(0x5dc2a3ff).into(),
selection: rgba(0x5dc2a33d).into(),
},
])),
syntax: Some(UserSyntaxTheme {
highlights: vec![
(
"attribute".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"boolean".into(),
UserHighlightStyle {
color: Some(rgba(0xebbcbaff).into()),
..Default::default()
},
),
(
"comment".into(),
UserHighlightStyle {
color: Some(rgba(0x6e6a86ff).into()),
..Default::default()
},
),
(
"comment.doc".into(),
UserHighlightStyle {
color: Some(rgba(0x777390ff).into()),
..Default::default()
},
),
(
"constant".into(),
UserHighlightStyle {
color: Some(rgba(0x5dc2a3ff).into()),
..Default::default()
},
),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"embedded".into(),
UserHighlightStyle {
color: Some(rgba(0xe0def4ff).into()),
..Default::default()
},
),
(
"emphasis".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"emphasis.strong".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"enum".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"function".into(),
UserHighlightStyle {
color: Some(rgba(0xebbcbaff).into()),
..Default::default()
},
),
(
"function.method".into(),
UserHighlightStyle {
color: Some(rgba(0xebbcbaff).into()),
..Default::default()
},
),
(
"hint".into(),
UserHighlightStyle {
color: Some(rgba(0x5e768cff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"keyword".into(),
UserHighlightStyle {
color: Some(rgba(0x31748fff).into()),
..Default::default()
},
),
(
"label".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"link_text".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
font_style: Some(UserFontStyle::Normal),
..Default::default()
},
),
(
"link_uri".into(),
UserHighlightStyle {
color: Some(rgba(0xebbcbaff).into()),
..Default::default()
},
),
(
"number".into(),
UserHighlightStyle {
color: Some(rgba(0x5dc2a3ff).into()),
..Default::default()
},
),
(
"operator".into(),
UserHighlightStyle {
color: Some(rgba(0x31748fff).into()),
..Default::default()
},
),
(
"predictive".into(),
UserHighlightStyle {
color: Some(rgba(0x556b81ff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"preproc".into(),
UserHighlightStyle {
color: Some(rgba(0xe0def4ff).into()),
..Default::default()
},
),
(
"primary".into(),
UserHighlightStyle {
color: Some(rgba(0xe0def4ff).into()),
..Default::default()
},
),
(
"property".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
(
"punctuation".into(),
UserHighlightStyle {
color: Some(rgba(0x908caaff).into()),
..Default::default()
},
),
(
"punctuation.bracket".into(),
UserHighlightStyle {
color: Some(rgba(0x9d99b6ff).into()),
..Default::default()
},
),
(
"punctuation.delimiter".into(),
UserHighlightStyle {
color: Some(rgba(0x9d99b6ff).into()),
..Default::default()
},
),
(
"punctuation.list_marker".into(),
UserHighlightStyle {
color: Some(rgba(0x9d99b6ff).into()),
..Default::default()
},
),
(
"punctuation.special".into(),
UserHighlightStyle {
color: Some(rgba(0x9d99b6ff).into()),
..Default::default()
},
),
(
"string".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0x777390ff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
..Default::default()
},
),
(
"text.literal".into(),
UserHighlightStyle {
color: Some(rgba(0xc4a7e6ff).into()),
..Default::default()
},
),
(
"title".into(),
UserHighlightStyle {
color: Some(rgba(0xf6c177ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"type".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
..Default::default()
},
),
(
"type.builtin".into(),
UserHighlightStyle {
color: Some(rgba(0x9ccfd8ff).into()),
..Default::default()
},
),
(
"variable".into(),
UserHighlightStyle {
color: Some(rgba(0xe0def4ff).into()),
..Default::default()
},
),
(
"variant".into(),
UserHighlightStyle {
color: Some(rgba(0x9cced7ff).into()),
..Default::default()
},
),
],
}),
},
},
], ],
} }
} }

View File

@ -15,450 +15,6 @@ pub fn solarized() -> UserThemeFamily {
name: "Solarized".into(), name: "Solarized".into(),
author: "Zed Industries".into(), author: "Zed Industries".into(),
themes: vec![ themes: vec![
UserTheme {
name: "Solarized Light".into(),
appearance: Appearance::Light,
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border: Some(rgba(0x9faaa8ff).into()),
border_variant: Some(rgba(0xdcdacbff).into()),
border_focused: Some(rgba(0xbfd3efff).into()),
border_selected: Some(rgba(0xbfd3efff).into()),
border_transparent: Some(rgba(0x00000000).into()),
border_disabled: Some(rgba(0xb7bdb6ff).into()),
elevated_surface_background: Some(rgba(0xf3eddaff).into()),
surface_background: Some(rgba(0xf3eddaff).into()),
background: Some(rgba(0xcfd0c4ff).into()),
panel_background: Some(rgba(0xf3eddaff).into()),
element_background: Some(rgba(0xf3eddaff).into()),
element_hover: Some(rgba(0xdcdacbff).into()),
element_active: Some(rgba(0xa2aca9ff).into()),
element_selected: Some(rgba(0xa2aca9ff).into()),
element_disabled: Some(rgba(0xf3eddaff).into()),
drop_target_background: Some(rgba(0x34555e80).into()),
ghost_element_background: Some(rgba(0x00000000).into()),
ghost_element_hover: Some(rgba(0xdcdacbff).into()),
ghost_element_active: Some(rgba(0xa2aca9ff).into()),
ghost_element_selected: Some(rgba(0xa2aca9ff).into()),
ghost_element_disabled: Some(rgba(0xf3eddaff).into()),
text: Some(rgba(0x002b36ff).into()),
text_muted: Some(rgba(0x34555eff).into()),
text_placeholder: Some(rgba(0x6a7f86ff).into()),
text_disabled: Some(rgba(0x6a7f86ff).into()),
text_accent: Some(rgba(0x298bd1ff).into()),
icon: Some(rgba(0x002b36ff).into()),
icon_muted: Some(rgba(0x34555eff).into()),
icon_disabled: Some(rgba(0x6a7f86ff).into()),
icon_placeholder: Some(rgba(0x34555eff).into()),
icon_accent: Some(rgba(0x298bd1ff).into()),
status_bar_background: Some(rgba(0xcfd0c4ff).into()),
title_bar_background: Some(rgba(0xcfd0c4ff).into()),
toolbar_background: Some(rgba(0xfdf6e3ff).into()),
tab_bar_background: Some(rgba(0xf3eddaff).into()),
tab_inactive_background: Some(rgba(0xf3eddaff).into()),
tab_active_background: Some(rgba(0xfdf6e3ff).into()),
scrollbar_thumb_background: Some(rgba(0x002b364c).into()),
scrollbar_thumb_hover_background: Some(rgba(0xdcdacbff).into()),
scrollbar_thumb_border: Some(rgba(0xdcdacbff).into()),
scrollbar_track_background: Some(rgba(0x00000000).into()),
scrollbar_track_border: Some(rgba(0xf5eedbff).into()),
editor_foreground: Some(rgba(0x002b36ff).into()),
editor_background: Some(rgba(0xfdf6e3ff).into()),
editor_gutter_background: Some(rgba(0xfdf6e3ff).into()),
editor_subheader_background: Some(rgba(0xf3eddaff).into()),
editor_active_line_background: Some(rgba(0xf3eddabf).into()),
editor_highlighted_line_background: Some(rgba(0xf3eddaff).into()),
editor_line_number: Some(rgba(0x002b3659).into()),
editor_active_line_number: Some(rgba(0x002b36ff).into()),
editor_invisible: Some(rgba(0x34555eff).into()),
editor_wrap_guide: Some(rgba(0x002b360d).into()),
editor_active_wrap_guide: Some(rgba(0x002b361a).into()),
editor_document_highlight_read_background: Some(rgba(0x298bd11a).into()),
editor_document_highlight_write_background: Some(rgba(0x6d828866).into()),
terminal_background: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_bright_black: Some(rgba(0x7b8e91ff).into()),
terminal_ansi_bright_red: Some(rgba(0xfaa091ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc6cb8bff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe1c28aff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa5c3e9ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xf0a2bfff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fd0cbff).into()),
terminal_ansi_bright_white: Some(rgba(0x002b36ff).into()),
terminal_ansi_black: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_red: Some(rgba(0xdc3330ff).into()),
terminal_ansi_green: Some(rgba(0x859904ff).into()),
terminal_ansi_yellow: Some(rgba(0xb58904ff).into()),
terminal_ansi_blue: Some(rgba(0x298bd1ff).into()),
terminal_ansi_magenta: Some(rgba(0xd33882ff).into()),
terminal_ansi_cyan: Some(rgba(0x2ca198ff).into()),
terminal_ansi_white: Some(rgba(0x002b36ff).into()),
link_text_hover: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
status: StatusColorsRefinement {
conflict: Some(rgba(0xb58904ff).into()),
conflict_background: Some(rgba(0xf5e6d0ff).into()),
conflict_border: Some(rgba(0xebd3aaff).into()),
created: Some(rgba(0x859904ff).into()),
created_background: Some(rgba(0xe9ead0ff).into()),
created_border: Some(rgba(0xd6d9abff).into()),
deleted: Some(rgba(0xdc3330ff).into()),
deleted_background: Some(rgba(0xffd9d2ff).into()),
deleted_border: Some(rgba(0xffbbafff).into()),
error: Some(rgba(0xdc3330ff).into()),
error_background: Some(rgba(0xffd9d2ff).into()),
error_border: Some(rgba(0xffbbafff).into()),
hidden: Some(rgba(0x6a7f86ff).into()),
hidden_background: Some(rgba(0xcfd0c4ff).into()),
hidden_border: Some(rgba(0xb7bdb6ff).into()),
hint: Some(rgba(0x5889a3ff).into()),
hint_background: Some(rgba(0xdbe6f6ff).into()),
hint_border: Some(rgba(0xbfd3efff).into()),
ignored: Some(rgba(0x34555eff).into()),
ignored_background: Some(rgba(0xcfd0c4ff).into()),
ignored_border: Some(rgba(0x9faaa8ff).into()),
info: Some(rgba(0x298bd1ff).into()),
info_background: Some(rgba(0xdbe6f6ff).into()),
info_border: Some(rgba(0xbfd3efff).into()),
modified: Some(rgba(0xb58904ff).into()),
modified_background: Some(rgba(0xf5e6d0ff).into()),
modified_border: Some(rgba(0xebd3aaff).into()),
predictive: Some(rgba(0x679aafff).into()),
predictive_background: Some(rgba(0xe9ead0ff).into()),
predictive_border: Some(rgba(0xd6d9abff).into()),
renamed: Some(rgba(0x298bd1ff).into()),
renamed_background: Some(rgba(0xdbe6f6ff).into()),
renamed_border: Some(rgba(0xbfd3efff).into()),
success: Some(rgba(0x859904ff).into()),
success_background: Some(rgba(0xe9ead0ff).into()),
success_border: Some(rgba(0xd6d9abff).into()),
unreachable: Some(rgba(0x34555eff).into()),
unreachable_background: Some(rgba(0xcfd0c4ff).into()),
unreachable_border: Some(rgba(0x9faaa8ff).into()),
warning: Some(rgba(0xb58904ff).into()),
warning_background: Some(rgba(0xf5e6d0ff).into()),
warning_border: Some(rgba(0xebd3aaff).into()),
..Default::default()
},
player: Some(PlayerColors(vec![
PlayerColor {
cursor: rgba(0x298bd1ff).into(),
background: rgba(0x298bd1ff).into(),
selection: rgba(0x298bd13d).into(),
},
PlayerColor {
cursor: rgba(0xd33882ff).into(),
background: rgba(0xd33882ff).into(),
selection: rgba(0xd338823d).into(),
},
PlayerColor {
cursor: rgba(0xcb4c18ff).into(),
background: rgba(0xcb4c18ff).into(),
selection: rgba(0xcb4c183d).into(),
},
PlayerColor {
cursor: rgba(0x6d71c4ff).into(),
background: rgba(0x6d71c4ff).into(),
selection: rgba(0x6d71c43d).into(),
},
PlayerColor {
cursor: rgba(0x2ca198ff).into(),
background: rgba(0x2ca198ff).into(),
selection: rgba(0x2ca1983d).into(),
},
PlayerColor {
cursor: rgba(0xdc3330ff).into(),
background: rgba(0xdc3330ff).into(),
selection: rgba(0xdc33303d).into(),
},
PlayerColor {
cursor: rgba(0xb58904ff).into(),
background: rgba(0xb58904ff).into(),
selection: rgba(0xb589043d).into(),
},
PlayerColor {
cursor: rgba(0x859904ff).into(),
background: rgba(0x859904ff).into(),
selection: rgba(0x8599043d).into(),
},
])),
syntax: Some(UserSyntaxTheme {
highlights: vec![
(
"attribute".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"boolean".into(),
UserHighlightStyle {
color: Some(rgba(0x859904ff).into()),
..Default::default()
},
),
(
"comment".into(),
UserHighlightStyle {
color: Some(rgba(0x30525bff).into()),
..Default::default()
},
),
(
"comment.doc".into(),
UserHighlightStyle {
color: Some(rgba(0x30525bff).into()),
..Default::default()
},
),
(
"constant".into(),
UserHighlightStyle {
color: Some(rgba(0x859904ff).into()),
..Default::default()
},
),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"embedded".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
..Default::default()
},
),
(
"emphasis".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"emphasis.strong".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"enum".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"function".into(),
UserHighlightStyle {
color: Some(rgba(0xb58904ff).into()),
..Default::default()
},
),
(
"hint".into(),
UserHighlightStyle {
color: Some(rgba(0x5889a3ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"keyword".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"label".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"link_text".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"link_uri".into(),
UserHighlightStyle {
color: Some(rgba(0x859904ff).into()),
..Default::default()
},
),
(
"number".into(),
UserHighlightStyle {
color: Some(rgba(0x859904ff).into()),
..Default::default()
},
),
(
"operator".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"predictive".into(),
UserHighlightStyle {
color: Some(rgba(0x679aafff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"preproc".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
..Default::default()
},
),
(
"primary".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
..Default::default()
},
),
(
"property".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"punctuation".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"punctuation.bracket".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"punctuation.delimiter".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"punctuation.list_marker".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"punctuation.special".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"string".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0x30525bff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"text.literal".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"title".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"type".into(),
UserHighlightStyle {
color: Some(rgba(0x2ca198ff).into()),
..Default::default()
},
),
(
"variable".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
..Default::default()
},
),
(
"variant".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
],
}),
},
},
UserTheme { UserTheme {
name: "Solarized Dark".into(), name: "Solarized Dark".into(),
appearance: Appearance::Dark, appearance: Appearance::Dark,
@ -903,6 +459,450 @@ pub fn solarized() -> UserThemeFamily {
}), }),
}, },
}, },
UserTheme {
name: "Solarized Light".into(),
appearance: Appearance::Light,
styles: UserThemeStylesRefinement {
colors: ThemeColorsRefinement {
border: Some(rgba(0x9faaa8ff).into()),
border_variant: Some(rgba(0xdcdacbff).into()),
border_focused: Some(rgba(0xbfd3efff).into()),
border_selected: Some(rgba(0xbfd3efff).into()),
border_transparent: Some(rgba(0x00000000).into()),
border_disabled: Some(rgba(0xb7bdb6ff).into()),
elevated_surface_background: Some(rgba(0xf3eddaff).into()),
surface_background: Some(rgba(0xf3eddaff).into()),
background: Some(rgba(0xcfd0c4ff).into()),
panel_background: Some(rgba(0xf3eddaff).into()),
element_background: Some(rgba(0xf3eddaff).into()),
element_hover: Some(rgba(0xdcdacbff).into()),
element_active: Some(rgba(0xa2aca9ff).into()),
element_selected: Some(rgba(0xa2aca9ff).into()),
element_disabled: Some(rgba(0xf3eddaff).into()),
drop_target_background: Some(rgba(0x34555e80).into()),
ghost_element_background: Some(rgba(0x00000000).into()),
ghost_element_hover: Some(rgba(0xdcdacbff).into()),
ghost_element_active: Some(rgba(0xa2aca9ff).into()),
ghost_element_selected: Some(rgba(0xa2aca9ff).into()),
ghost_element_disabled: Some(rgba(0xf3eddaff).into()),
text: Some(rgba(0x002b36ff).into()),
text_muted: Some(rgba(0x34555eff).into()),
text_placeholder: Some(rgba(0x6a7f86ff).into()),
text_disabled: Some(rgba(0x6a7f86ff).into()),
text_accent: Some(rgba(0x298bd1ff).into()),
icon: Some(rgba(0x002b36ff).into()),
icon_muted: Some(rgba(0x34555eff).into()),
icon_disabled: Some(rgba(0x6a7f86ff).into()),
icon_placeholder: Some(rgba(0x34555eff).into()),
icon_accent: Some(rgba(0x298bd1ff).into()),
status_bar_background: Some(rgba(0xcfd0c4ff).into()),
title_bar_background: Some(rgba(0xcfd0c4ff).into()),
toolbar_background: Some(rgba(0xfdf6e3ff).into()),
tab_bar_background: Some(rgba(0xf3eddaff).into()),
tab_inactive_background: Some(rgba(0xf3eddaff).into()),
tab_active_background: Some(rgba(0xfdf6e3ff).into()),
scrollbar_thumb_background: Some(rgba(0x002b364c).into()),
scrollbar_thumb_hover_background: Some(rgba(0xdcdacbff).into()),
scrollbar_thumb_border: Some(rgba(0xdcdacbff).into()),
scrollbar_track_background: Some(rgba(0x00000000).into()),
scrollbar_track_border: Some(rgba(0xf5eedbff).into()),
editor_foreground: Some(rgba(0x002b36ff).into()),
editor_background: Some(rgba(0xfdf6e3ff).into()),
editor_gutter_background: Some(rgba(0xfdf6e3ff).into()),
editor_subheader_background: Some(rgba(0xf3eddaff).into()),
editor_active_line_background: Some(rgba(0xf3eddabf).into()),
editor_highlighted_line_background: Some(rgba(0xf3eddaff).into()),
editor_line_number: Some(rgba(0x002b3659).into()),
editor_active_line_number: Some(rgba(0x002b36ff).into()),
editor_invisible: Some(rgba(0x34555eff).into()),
editor_wrap_guide: Some(rgba(0x002b360d).into()),
editor_active_wrap_guide: Some(rgba(0x002b361a).into()),
editor_document_highlight_read_background: Some(rgba(0x298bd11a).into()),
editor_document_highlight_write_background: Some(rgba(0x6d828866).into()),
terminal_background: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_bright_black: Some(rgba(0x7b8e91ff).into()),
terminal_ansi_bright_red: Some(rgba(0xfaa091ff).into()),
terminal_ansi_bright_green: Some(rgba(0xc6cb8bff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xe1c28aff).into()),
terminal_ansi_bright_blue: Some(rgba(0xa5c3e9ff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xf0a2bfff).into()),
terminal_ansi_bright_cyan: Some(rgba(0x9fd0cbff).into()),
terminal_ansi_bright_white: Some(rgba(0x002b36ff).into()),
terminal_ansi_black: Some(rgba(0xfdf6e3ff).into()),
terminal_ansi_red: Some(rgba(0xdc3330ff).into()),
terminal_ansi_green: Some(rgba(0x859904ff).into()),
terminal_ansi_yellow: Some(rgba(0xb58904ff).into()),
terminal_ansi_blue: Some(rgba(0x298bd1ff).into()),
terminal_ansi_magenta: Some(rgba(0xd33882ff).into()),
terminal_ansi_cyan: Some(rgba(0x2ca198ff).into()),
terminal_ansi_white: Some(rgba(0x002b36ff).into()),
link_text_hover: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
status: StatusColorsRefinement {
conflict: Some(rgba(0xb58904ff).into()),
conflict_background: Some(rgba(0xf5e6d0ff).into()),
conflict_border: Some(rgba(0xebd3aaff).into()),
created: Some(rgba(0x859904ff).into()),
created_background: Some(rgba(0xe9ead0ff).into()),
created_border: Some(rgba(0xd6d9abff).into()),
deleted: Some(rgba(0xdc3330ff).into()),
deleted_background: Some(rgba(0xffd9d2ff).into()),
deleted_border: Some(rgba(0xffbbafff).into()),
error: Some(rgba(0xdc3330ff).into()),
error_background: Some(rgba(0xffd9d2ff).into()),
error_border: Some(rgba(0xffbbafff).into()),
hidden: Some(rgba(0x6a7f86ff).into()),
hidden_background: Some(rgba(0xcfd0c4ff).into()),
hidden_border: Some(rgba(0xb7bdb6ff).into()),
hint: Some(rgba(0x5889a3ff).into()),
hint_background: Some(rgba(0xdbe6f6ff).into()),
hint_border: Some(rgba(0xbfd3efff).into()),
ignored: Some(rgba(0x34555eff).into()),
ignored_background: Some(rgba(0xcfd0c4ff).into()),
ignored_border: Some(rgba(0x9faaa8ff).into()),
info: Some(rgba(0x298bd1ff).into()),
info_background: Some(rgba(0xdbe6f6ff).into()),
info_border: Some(rgba(0xbfd3efff).into()),
modified: Some(rgba(0xb58904ff).into()),
modified_background: Some(rgba(0xf5e6d0ff).into()),
modified_border: Some(rgba(0xebd3aaff).into()),
predictive: Some(rgba(0x679aafff).into()),
predictive_background: Some(rgba(0xe9ead0ff).into()),
predictive_border: Some(rgba(0xd6d9abff).into()),
renamed: Some(rgba(0x298bd1ff).into()),
renamed_background: Some(rgba(0xdbe6f6ff).into()),
renamed_border: Some(rgba(0xbfd3efff).into()),
success: Some(rgba(0x859904ff).into()),
success_background: Some(rgba(0xe9ead0ff).into()),
success_border: Some(rgba(0xd6d9abff).into()),
unreachable: Some(rgba(0x34555eff).into()),
unreachable_background: Some(rgba(0xcfd0c4ff).into()),
unreachable_border: Some(rgba(0x9faaa8ff).into()),
warning: Some(rgba(0xb58904ff).into()),
warning_background: Some(rgba(0xf5e6d0ff).into()),
warning_border: Some(rgba(0xebd3aaff).into()),
..Default::default()
},
player: Some(PlayerColors(vec![
PlayerColor {
cursor: rgba(0x298bd1ff).into(),
background: rgba(0x298bd1ff).into(),
selection: rgba(0x298bd13d).into(),
},
PlayerColor {
cursor: rgba(0xd33882ff).into(),
background: rgba(0xd33882ff).into(),
selection: rgba(0xd338823d).into(),
},
PlayerColor {
cursor: rgba(0xcb4c18ff).into(),
background: rgba(0xcb4c18ff).into(),
selection: rgba(0xcb4c183d).into(),
},
PlayerColor {
cursor: rgba(0x6d71c4ff).into(),
background: rgba(0x6d71c4ff).into(),
selection: rgba(0x6d71c43d).into(),
},
PlayerColor {
cursor: rgba(0x2ca198ff).into(),
background: rgba(0x2ca198ff).into(),
selection: rgba(0x2ca1983d).into(),
},
PlayerColor {
cursor: rgba(0xdc3330ff).into(),
background: rgba(0xdc3330ff).into(),
selection: rgba(0xdc33303d).into(),
},
PlayerColor {
cursor: rgba(0xb58904ff).into(),
background: rgba(0xb58904ff).into(),
selection: rgba(0xb589043d).into(),
},
PlayerColor {
cursor: rgba(0x859904ff).into(),
background: rgba(0x859904ff).into(),
selection: rgba(0x8599043d).into(),
},
])),
syntax: Some(UserSyntaxTheme {
highlights: vec![
(
"attribute".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"boolean".into(),
UserHighlightStyle {
color: Some(rgba(0x859904ff).into()),
..Default::default()
},
),
(
"comment".into(),
UserHighlightStyle {
color: Some(rgba(0x30525bff).into()),
..Default::default()
},
),
(
"comment.doc".into(),
UserHighlightStyle {
color: Some(rgba(0x30525bff).into()),
..Default::default()
},
),
(
"constant".into(),
UserHighlightStyle {
color: Some(rgba(0x859904ff).into()),
..Default::default()
},
),
(
"constructor".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"embedded".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
..Default::default()
},
),
(
"emphasis".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"emphasis.strong".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"enum".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"function".into(),
UserHighlightStyle {
color: Some(rgba(0xb58904ff).into()),
..Default::default()
},
),
(
"hint".into(),
UserHighlightStyle {
color: Some(rgba(0x5889a3ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"keyword".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"label".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"link_text".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"link_uri".into(),
UserHighlightStyle {
color: Some(rgba(0x859904ff).into()),
..Default::default()
},
),
(
"number".into(),
UserHighlightStyle {
color: Some(rgba(0x859904ff).into()),
..Default::default()
},
),
(
"operator".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"predictive".into(),
UserHighlightStyle {
color: Some(rgba(0x679aafff).into()),
font_style: Some(UserFontStyle::Italic),
..Default::default()
},
),
(
"preproc".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
..Default::default()
},
),
(
"primary".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
..Default::default()
},
),
(
"property".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"punctuation".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"punctuation.bracket".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"punctuation.delimiter".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"punctuation.list_marker".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"punctuation.special".into(),
UserHighlightStyle {
color: Some(rgba(0x05333eff).into()),
..Default::default()
},
),
(
"string".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"string.escape".into(),
UserHighlightStyle {
color: Some(rgba(0x30525bff).into()),
..Default::default()
},
),
(
"string.regex".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"string.special".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"string.special.symbol".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"tag".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
(
"text.literal".into(),
UserHighlightStyle {
color: Some(rgba(0xcb4c18ff).into()),
..Default::default()
},
),
(
"title".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},
),
(
"type".into(),
UserHighlightStyle {
color: Some(rgba(0x2ca198ff).into()),
..Default::default()
},
),
(
"variable".into(),
UserHighlightStyle {
color: Some(rgba(0x002b36ff).into()),
..Default::default()
},
),
(
"variant".into(),
UserHighlightStyle {
color: Some(rgba(0x298bd1ff).into()),
..Default::default()
},
),
],
}),
},
},
], ],
} }
} }

View File

@ -11,6 +11,7 @@ clap = { version = "4.4", features = ["derive"] }
convert_case = "0.6.0" convert_case = "0.6.0"
gpui = { path = "../gpui" } gpui = { path = "../gpui" }
indexmap = { version = "1.6.2", features = ["serde"] } indexmap = { version = "1.6.2", features = ["serde"] }
indoc.workspace = true
json_comments = "0.2.2" json_comments = "0.2.2"
log.workspace = true log.workspace = true
palette = { version = "0.7.3", default-features = false, features = ["std"] } palette = { version = "0.7.3", default-features = false, features = ["std"] }

View File

@ -18,6 +18,7 @@ use clap::Parser;
use convert_case::{Case, Casing}; use convert_case::{Case, Casing};
use gpui::serde_json; use gpui::serde_json;
use indexmap::IndexMap; use indexmap::IndexMap;
use indoc::formatdoc;
use json_comments::StripComments; use json_comments::StripComments;
use log::LevelFilter; use log::LevelFilter;
use serde::Deserialize; use serde::Deserialize;
@ -28,7 +29,7 @@ use crate::theme_printer::UserThemeFamilyPrinter;
use crate::vscode::VsCodeTheme; use crate::vscode::VsCodeTheme;
use crate::vscode::VsCodeThemeConverter; use crate::vscode::VsCodeThemeConverter;
use crate::zed1::theme::Theme as Zed1Theme; use crate::zed1::theme::Theme as Zed1Theme;
use crate::zed1::Zed1ThemeConverter; use crate::zed1::{zed1_theme_licenses, Zed1ThemeConverter};
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
struct FamilyMetadata { struct FamilyMetadata {
@ -200,7 +201,13 @@ fn main() -> Result<()> {
"Summercamp", "Summercamp",
]; ];
let mut zed1_themes_by_family: HashMap<String, Vec<UserTheme>> = HashMap::from_iter( let zed1_licenses_by_theme: HashMap<String, zed1::Zed1ThemeLicense> = HashMap::from_iter(
zed1_theme_licenses()
.into_iter()
.map(|theme_license| (theme_license.theme.clone(), theme_license)),
);
let mut zed1_themes_by_family: IndexMap<String, Vec<UserTheme>> = IndexMap::from_iter(
zed1_theme_familes zed1_theme_familes
.into_iter() .into_iter()
.map(|family| (family.to_string(), Vec::new())), .map(|family| (family.to_string(), Vec::new())),
@ -254,13 +261,44 @@ fn main() -> Result<()> {
themes_for_family.push(theme); themes_for_family.push(theme);
} }
zed1_themes_by_family.sort_keys();
let mut licenses = Vec::new();
for (family, themes) in zed1_themes_by_family { for (family, themes) in zed1_themes_by_family {
let theme_family = UserThemeFamily { let mut theme_family = UserThemeFamily {
name: family, name: family,
author: "Zed Industries".to_string(), author: "Zed Industries".to_string(),
themes, themes,
}; };
theme_family
.themes
.sort_unstable_by_key(|theme| theme.name.clone());
for theme in &theme_family.themes {
let license = zed1_licenses_by_theme
.get(&theme.name)
.ok_or_else(|| anyhow!("missing license for theme: '{}'", theme.name))?;
let license_header = match license.license_url.as_ref() {
Some(license_url) => {
format!("[{theme_name}]({license_url})", theme_name = theme.name)
}
None => theme.name.clone(),
};
licenses.push(formatdoc!(
"
## {license_header}
{license_text}
********************************************************************************
",
license_text = license.license_text
));
}
theme_families.push(theme_family); theme_families.push(theme_family);
} }
@ -357,6 +395,12 @@ fn main() -> Result<()> {
mod_rs_file.write_all(mod_rs_contents.as_bytes())?; mod_rs_file.write_all(mod_rs_contents.as_bytes())?;
log::info!("Writing LICENSES file...");
let mut licenses_file = File::create(themes_output_path.join(format!("LICENSES")))?;
licenses_file.write_all(licenses.join("\n").as_bytes())?;
log::info!("Formatting themes..."); log::info!("Formatting themes...");
let format_result = format_themes_crate() let format_result = format_themes_crate()

View File

@ -1,4 +1,6 @@
mod converter; mod converter;
mod licenses;
pub mod theme; pub mod theme;
pub use converter::*; pub use converter::*;
pub use licenses::*;

File diff suppressed because it is too large Load Diff

View File

@ -9,10 +9,7 @@ OUTPUT_FILE=$(pwd)/assets/licenses.md
echo -e "# ###### THEME LICENSES ######\n" >> $OUTPUT_FILE echo -e "# ###### THEME LICENSES ######\n" >> $OUTPUT_FILE
echo "Generating theme licenses" echo "Generating theme licenses"
cd styles cat crates/theme/src/themes/LICENSES >> $OUTPUT_FILE
npm --silent ci
npm run --silent build-licenses >> $OUTPUT_FILE
cd ..
echo -e "# ###### CODE LICENSES ######\n" >> $OUTPUT_FILE echo -e "# ###### CODE LICENSES ######\n" >> $OUTPUT_FILE