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:
Marshall Bowers 2023-12-07 18:34:03 -05:00 committed by GitHub
parent 0b78a401de
commit c7e19c0bcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 974 additions and 871 deletions

View file

@ -24,9 +24,9 @@ pub fn dracula() -> UserThemeFamily {
border_selected: Some(rgba(0xbd93f9ff).into()),
border_transparent: Some(rgba(0xbd93f9ff).into()),
border_disabled: Some(rgba(0xbd93f9ff).into()),
elevated_surface_background: Some(rgba(0x282a35ff).into()),
surface_background: Some(rgba(0x282a35ff).into()),
background: Some(rgba(0x282a35ff).into()),
elevated_surface_background: Some(rgba(0x282a36ff).into()),
surface_background: Some(rgba(0x282a36ff).into()),
background: Some(rgba(0x282a36ff).into()),
element_background: Some(rgba(0x44475aff).into()),
element_hover: Some(rgba(0x44475a75).into()),
element_selected: Some(rgba(0x44475aff).into()),
@ -34,19 +34,19 @@ pub fn dracula() -> UserThemeFamily {
ghost_element_hover: Some(rgba(0x44475a75).into()),
text: Some(rgba(0xf8f8f2ff).into()),
tab_inactive_background: Some(rgba(0x21222cff).into()),
tab_active_background: Some(rgba(0x282a35ff).into()),
editor_background: Some(rgba(0x282a35ff).into()),
editor_gutter_background: Some(rgba(0x282a35ff).into()),
tab_active_background: Some(rgba(0x282a36ff).into()),
editor_background: Some(rgba(0x282a36ff).into()),
editor_gutter_background: Some(rgba(0x282a36ff).into()),
editor_line_number: Some(rgba(0x6272a4ff).into()),
editor_active_line_number: Some(rgba(0xf8f8f2ff).into()),
terminal_background: Some(rgba(0x282a35ff).into()),
terminal_background: Some(rgba(0x282a36ff).into()),
terminal_ansi_bright_black: Some(rgba(0x6272a4ff).into()),
terminal_ansi_bright_red: Some(rgba(0xff6d6dff).into()),
terminal_ansi_bright_red: Some(rgba(0xff6e6eff).into()),
terminal_ansi_bright_green: Some(rgba(0x69ff94ff).into()),
terminal_ansi_bright_yellow: Some(rgba(0xffffa5ff).into()),
terminal_ansi_bright_blue: Some(rgba(0xd6abfeff).into()),
terminal_ansi_bright_blue: Some(rgba(0xd6acffff).into()),
terminal_ansi_bright_magenta: Some(rgba(0xff92dfff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa3fefeff).into()),
terminal_ansi_bright_cyan: Some(rgba(0xa4ffffff).into()),
terminal_ansi_bright_white: Some(rgba(0xffffffff).into()),
terminal_ansi_black: Some(rgba(0x21222cff).into()),
terminal_ansi_red: Some(rgba(0xff5555ff).into()),
@ -63,7 +63,7 @@ pub fn dracula() -> UserThemeFamily {
error: Some(rgba(0xff5555ff).into()),
hidden: Some(rgba(0x6272a4ff).into()),
hint: Some(rgba(0x969696ff).into()),
warning: Some(rgba(0xffb76bff).into()),
warning: Some(rgba(0xffb86cff).into()),
..Default::default()
},
syntax: Some(UserSyntaxTheme {
@ -94,7 +94,7 @@ pub fn dracula() -> UserThemeFamily {
(
"emphasis.strong".into(),
UserHighlightStyle {
color: Some(rgba(0xffb76bff).into()),
color: Some(rgba(0xffb86cff).into()),
font_weight: Some(UserFontWeight(700.0)),
..Default::default()
},