Emit accurate hex colors in generated themes (#3547)
This PR fixes an issues where the hex colors in the generated themes were not correct. We're using the [`palette`](https://crates.io/crates/palette) crate to perform the conversions, as this gives us accurate hex codes that match the VS Code source themes. Release Notes: - N/A
This commit is contained in:
parent
0b78a401de
commit
c7e19c0bcd
17 changed files with 974 additions and 871 deletions
|
@ -19,29 +19,29 @@ pub fn palenight() -> UserThemeFamily {
|
|||
appearance: Appearance::Dark,
|
||||
styles: UserThemeStylesRefinement {
|
||||
colors: ThemeColorsRefinement {
|
||||
border: Some(rgba(0x282b3bff).into()),
|
||||
border_variant: Some(rgba(0x282b3bff).into()),
|
||||
border_focused: Some(rgba(0x282b3bff).into()),
|
||||
border_selected: Some(rgba(0x282b3bff).into()),
|
||||
border_transparent: Some(rgba(0x282b3bff).into()),
|
||||
border_disabled: Some(rgba(0x282b3bff).into()),
|
||||
elevated_surface_background: Some(rgba(0x292c3eff).into()),
|
||||
surface_background: Some(rgba(0x292c3eff).into()),
|
||||
background: Some(rgba(0x292c3eff).into()),
|
||||
element_background: Some(rgba(0x7d56c1cc).into()),
|
||||
border: Some(rgba(0x282b3cff).into()),
|
||||
border_variant: Some(rgba(0x282b3cff).into()),
|
||||
border_focused: Some(rgba(0x282b3cff).into()),
|
||||
border_selected: Some(rgba(0x282b3cff).into()),
|
||||
border_transparent: Some(rgba(0x282b3cff).into()),
|
||||
border_disabled: Some(rgba(0x282b3cff).into()),
|
||||
elevated_surface_background: Some(rgba(0x292d3eff).into()),
|
||||
surface_background: Some(rgba(0x292d3eff).into()),
|
||||
background: Some(rgba(0x292d3eff).into()),
|
||||
element_background: Some(rgba(0x7e57c2cc).into()),
|
||||
element_hover: Some(rgba(0x0000001a).into()),
|
||||
element_selected: Some(rgba(0x7d56c1ff).into()),
|
||||
element_selected: Some(rgba(0x7e57c2ff).into()),
|
||||
drop_target_background: Some(rgba(0x2e3245ff).into()),
|
||||
ghost_element_hover: Some(rgba(0x0000001a).into()),
|
||||
text: Some(rgba(0xffffffff).into()),
|
||||
tab_inactive_background: Some(rgba(0x31364aff).into()),
|
||||
tab_active_background: Some(rgba(0x292c3eff).into()),
|
||||
editor_background: Some(rgba(0x292c3eff).into()),
|
||||
editor_gutter_background: Some(rgba(0x292c3eff).into()),
|
||||
tab_active_background: Some(rgba(0x292d3eff).into()),
|
||||
editor_background: Some(rgba(0x292d3eff).into()),
|
||||
editor_gutter_background: Some(rgba(0x292d3eff).into()),
|
||||
editor_line_number: Some(rgba(0x4c5374ff).into()),
|
||||
editor_active_line_number: Some(rgba(0xbfc7d5ff).into()),
|
||||
terminal_ansi_bright_black: Some(rgba(0x676e95ff).into()),
|
||||
terminal_ansi_bright_red: Some(rgba(0xff5571ff).into()),
|
||||
terminal_ansi_bright_red: Some(rgba(0xff5572ff).into()),
|
||||
terminal_ansi_bright_green: Some(rgba(0xc3e88dff).into()),
|
||||
terminal_ansi_bright_yellow: Some(rgba(0xffcb6bff).into()),
|
||||
terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()),
|
||||
|
@ -49,7 +49,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
terminal_ansi_bright_cyan: Some(rgba(0x89ddffff).into()),
|
||||
terminal_ansi_bright_white: Some(rgba(0xffffffff).into()),
|
||||
terminal_ansi_black: Some(rgba(0x676e95ff).into()),
|
||||
terminal_ansi_red: Some(rgba(0xff5571ff).into()),
|
||||
terminal_ansi_red: Some(rgba(0xff5572ff).into()),
|
||||
terminal_ansi_green: Some(rgba(0xa9c77dff).into()),
|
||||
terminal_ansi_yellow: Some(rgba(0xffcb6bff).into()),
|
||||
terminal_ansi_blue: Some(rgba(0x82aaffff).into()),
|
||||
|
@ -59,9 +59,9 @@ pub fn palenight() -> UserThemeFamily {
|
|||
..Default::default()
|
||||
},
|
||||
status: StatusColorsRefinement {
|
||||
deleted: Some(rgba(0xef524fff).into()),
|
||||
error: Some(rgba(0xef524fff).into()),
|
||||
hidden: Some(rgba(0x9199c8ff).into()),
|
||||
deleted: Some(rgba(0xef5350ff).into()),
|
||||
error: Some(rgba(0xef5350ff).into()),
|
||||
hidden: Some(rgba(0x929ac9ff).into()),
|
||||
hint: Some(rgba(0x969696ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
|
@ -84,7 +84,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"comment".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0x687097ff).into()),
|
||||
color: Some(rgba(0x697098ff).into()),
|
||||
font_style: Some(UserFontStyle::Italic),
|
||||
..Default::default()
|
||||
},
|
||||
|
@ -143,7 +143,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"number".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0xf78b6bff).into()),
|
||||
color: Some(rgba(0xf78c6cff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -157,7 +157,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"property".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0x7fcac3ff).into()),
|
||||
color: Some(rgba(0x80cbc4ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -185,7 +185,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"tag".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0xff5571ff).into()),
|
||||
color: Some(rgba(0xff5572ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -213,7 +213,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"variable.special".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0xff5571ff).into()),
|
||||
color: Some(rgba(0xff5572ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -226,29 +226,29 @@ pub fn palenight() -> UserThemeFamily {
|
|||
appearance: Appearance::Dark,
|
||||
styles: UserThemeStylesRefinement {
|
||||
colors: ThemeColorsRefinement {
|
||||
border: Some(rgba(0x282b3bff).into()),
|
||||
border_variant: Some(rgba(0x282b3bff).into()),
|
||||
border_focused: Some(rgba(0x282b3bff).into()),
|
||||
border_selected: Some(rgba(0x282b3bff).into()),
|
||||
border_transparent: Some(rgba(0x282b3bff).into()),
|
||||
border_disabled: Some(rgba(0x282b3bff).into()),
|
||||
elevated_surface_background: Some(rgba(0x292c3eff).into()),
|
||||
surface_background: Some(rgba(0x292c3eff).into()),
|
||||
background: Some(rgba(0x292c3eff).into()),
|
||||
element_background: Some(rgba(0x7d56c1cc).into()),
|
||||
border: Some(rgba(0x282b3cff).into()),
|
||||
border_variant: Some(rgba(0x282b3cff).into()),
|
||||
border_focused: Some(rgba(0x282b3cff).into()),
|
||||
border_selected: Some(rgba(0x282b3cff).into()),
|
||||
border_transparent: Some(rgba(0x282b3cff).into()),
|
||||
border_disabled: Some(rgba(0x282b3cff).into()),
|
||||
elevated_surface_background: Some(rgba(0x292d3eff).into()),
|
||||
surface_background: Some(rgba(0x292d3eff).into()),
|
||||
background: Some(rgba(0x292d3eff).into()),
|
||||
element_background: Some(rgba(0x7e57c2cc).into()),
|
||||
element_hover: Some(rgba(0x0000001a).into()),
|
||||
element_selected: Some(rgba(0x7d56c1ff).into()),
|
||||
element_selected: Some(rgba(0x7e57c2ff).into()),
|
||||
drop_target_background: Some(rgba(0x2e3245ff).into()),
|
||||
ghost_element_hover: Some(rgba(0x0000001a).into()),
|
||||
text: Some(rgba(0xffffffff).into()),
|
||||
tab_inactive_background: Some(rgba(0x31364aff).into()),
|
||||
tab_active_background: Some(rgba(0x292c3eff).into()),
|
||||
editor_background: Some(rgba(0x292c3eff).into()),
|
||||
editor_gutter_background: Some(rgba(0x292c3eff).into()),
|
||||
tab_active_background: Some(rgba(0x292d3eff).into()),
|
||||
editor_background: Some(rgba(0x292d3eff).into()),
|
||||
editor_gutter_background: Some(rgba(0x292d3eff).into()),
|
||||
editor_line_number: Some(rgba(0x4c5374ff).into()),
|
||||
editor_active_line_number: Some(rgba(0xbfc7d5ff).into()),
|
||||
terminal_ansi_bright_black: Some(rgba(0x676e95ff).into()),
|
||||
terminal_ansi_bright_red: Some(rgba(0xff5571ff).into()),
|
||||
terminal_ansi_bright_red: Some(rgba(0xff5572ff).into()),
|
||||
terminal_ansi_bright_green: Some(rgba(0xc3e88dff).into()),
|
||||
terminal_ansi_bright_yellow: Some(rgba(0xffcb6bff).into()),
|
||||
terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()),
|
||||
|
@ -256,7 +256,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
terminal_ansi_bright_cyan: Some(rgba(0x89ddffff).into()),
|
||||
terminal_ansi_bright_white: Some(rgba(0xffffffff).into()),
|
||||
terminal_ansi_black: Some(rgba(0x676e95ff).into()),
|
||||
terminal_ansi_red: Some(rgba(0xff5571ff).into()),
|
||||
terminal_ansi_red: Some(rgba(0xff5572ff).into()),
|
||||
terminal_ansi_green: Some(rgba(0xa9c77dff).into()),
|
||||
terminal_ansi_yellow: Some(rgba(0xffcb6bff).into()),
|
||||
terminal_ansi_blue: Some(rgba(0x82aaffff).into()),
|
||||
|
@ -266,9 +266,9 @@ pub fn palenight() -> UserThemeFamily {
|
|||
..Default::default()
|
||||
},
|
||||
status: StatusColorsRefinement {
|
||||
deleted: Some(rgba(0xef524fff).into()),
|
||||
error: Some(rgba(0xef524fff).into()),
|
||||
hidden: Some(rgba(0x9199c8ff).into()),
|
||||
deleted: Some(rgba(0xef5350ff).into()),
|
||||
error: Some(rgba(0xef5350ff).into()),
|
||||
hidden: Some(rgba(0x929ac9ff).into()),
|
||||
hint: Some(rgba(0x969696ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
|
@ -291,7 +291,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"comment".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0x687097ff).into()),
|
||||
color: Some(rgba(0x697098ff).into()),
|
||||
font_style: Some(UserFontStyle::Italic),
|
||||
..Default::default()
|
||||
},
|
||||
|
@ -350,7 +350,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"number".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0xf78b6bff).into()),
|
||||
color: Some(rgba(0xf78c6cff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -364,7 +364,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"property".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0x7fcac3ff).into()),
|
||||
color: Some(rgba(0x80cbc4ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -392,7 +392,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"tag".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0xff5571ff).into()),
|
||||
color: Some(rgba(0xff5572ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -420,7 +420,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"variable.special".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0xff5571ff).into()),
|
||||
color: Some(rgba(0xff5572ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -439,23 +439,23 @@ pub fn palenight() -> UserThemeFamily {
|
|||
border_selected: Some(rgba(0x2c2f40ff).into()),
|
||||
border_transparent: Some(rgba(0x2c2f40ff).into()),
|
||||
border_disabled: Some(rgba(0x2c2f40ff).into()),
|
||||
elevated_surface_background: Some(rgba(0x25283aff).into()),
|
||||
surface_background: Some(rgba(0x25283aff).into()),
|
||||
background: Some(rgba(0x292c3eff).into()),
|
||||
element_background: Some(rgba(0x7d56c1cc).into()),
|
||||
elevated_surface_background: Some(rgba(0x25293aff).into()),
|
||||
surface_background: Some(rgba(0x25293aff).into()),
|
||||
background: Some(rgba(0x292d3eff).into()),
|
||||
element_background: Some(rgba(0x7e57c2cc).into()),
|
||||
element_hover: Some(rgba(0x0000001a).into()),
|
||||
element_selected: Some(rgba(0x7d56c1ff).into()),
|
||||
element_selected: Some(rgba(0x7e57c2ff).into()),
|
||||
drop_target_background: Some(rgba(0x2e3245ff).into()),
|
||||
ghost_element_hover: Some(rgba(0x0000001a).into()),
|
||||
text: Some(rgba(0xffffffff).into()),
|
||||
tab_inactive_background: Some(rgba(0x31364aff).into()),
|
||||
tab_active_background: Some(rgba(0x25283aff).into()),
|
||||
editor_background: Some(rgba(0x292c3eff).into()),
|
||||
editor_gutter_background: Some(rgba(0x292c3eff).into()),
|
||||
tab_active_background: Some(rgba(0x25293aff).into()),
|
||||
editor_background: Some(rgba(0x292d3eff).into()),
|
||||
editor_gutter_background: Some(rgba(0x292d3eff).into()),
|
||||
editor_line_number: Some(rgba(0x4c5374ff).into()),
|
||||
editor_active_line_number: Some(rgba(0xbfc7d5ff).into()),
|
||||
terminal_ansi_bright_black: Some(rgba(0x676e95ff).into()),
|
||||
terminal_ansi_bright_red: Some(rgba(0xff5571ff).into()),
|
||||
terminal_ansi_bright_red: Some(rgba(0xff5572ff).into()),
|
||||
terminal_ansi_bright_green: Some(rgba(0xc3e88dff).into()),
|
||||
terminal_ansi_bright_yellow: Some(rgba(0xffcb6bff).into()),
|
||||
terminal_ansi_bright_blue: Some(rgba(0x82aaffff).into()),
|
||||
|
@ -463,7 +463,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
terminal_ansi_bright_cyan: Some(rgba(0x89ddffff).into()),
|
||||
terminal_ansi_bright_white: Some(rgba(0xffffffff).into()),
|
||||
terminal_ansi_black: Some(rgba(0x676e95ff).into()),
|
||||
terminal_ansi_red: Some(rgba(0xff5571ff).into()),
|
||||
terminal_ansi_red: Some(rgba(0xff5572ff).into()),
|
||||
terminal_ansi_green: Some(rgba(0xa9c77dff).into()),
|
||||
terminal_ansi_yellow: Some(rgba(0xffcb6bff).into()),
|
||||
terminal_ansi_blue: Some(rgba(0x82aaffff).into()),
|
||||
|
@ -473,9 +473,9 @@ pub fn palenight() -> UserThemeFamily {
|
|||
..Default::default()
|
||||
},
|
||||
status: StatusColorsRefinement {
|
||||
deleted: Some(rgba(0xef524fff).into()),
|
||||
error: Some(rgba(0xef524fff).into()),
|
||||
hidden: Some(rgba(0x9199c8ff).into()),
|
||||
deleted: Some(rgba(0xef5350ff).into()),
|
||||
error: Some(rgba(0xef5350ff).into()),
|
||||
hidden: Some(rgba(0x929ac9ff).into()),
|
||||
hint: Some(rgba(0x969696ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
|
@ -498,7 +498,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"comment".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0x687097ff).into()),
|
||||
color: Some(rgba(0x697098ff).into()),
|
||||
font_style: Some(UserFontStyle::Italic),
|
||||
..Default::default()
|
||||
},
|
||||
|
@ -557,7 +557,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"number".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0xf78b6bff).into()),
|
||||
color: Some(rgba(0xf78c6cff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -571,7 +571,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"property".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0x7fcac3ff).into()),
|
||||
color: Some(rgba(0x80cbc4ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -599,7 +599,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"tag".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0xff5571ff).into()),
|
||||
color: Some(rgba(0xff5572ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
@ -627,7 +627,7 @@ pub fn palenight() -> UserThemeFamily {
|
|||
(
|
||||
"variable.special".into(),
|
||||
UserHighlightStyle {
|
||||
color: Some(rgba(0xff5571ff).into()),
|
||||
color: Some(rgba(0xff5572ff).into()),
|
||||
..Default::default()
|
||||
},
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue