From 853192b05904ae675fb16534f33c0a5dddf056ce Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 2 Jan 2024 12:08:29 -0500 Subject: [PATCH] Map suggestion colors from Zed1 themes (#3835) This PR maps the suggestions colors from the Zed1 themes to the Zed2 themes. Release Notes: - N/A --- crates/theme2/src/themes/andromeda.rs | 1 + crates/theme2/src/themes/atelier.rs | 20 ++++++++++++++++++++ crates/theme2/src/themes/ayu.rs | 3 +++ crates/theme2/src/themes/gruvbox.rs | 6 ++++++ crates/theme2/src/themes/one.rs | 2 ++ crates/theme2/src/themes/rose_pine.rs | 3 +++ crates/theme2/src/themes/sandcastle.rs | 1 + crates/theme2/src/themes/solarized.rs | 2 ++ crates/theme2/src/themes/summercamp.rs | 1 + crates/theme_importer/src/zed1/converter.rs | 1 + 10 files changed, 40 insertions(+) diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rs index 0c4e03ccdd..ba6eadd315 100644 --- a/crates/theme2/src/themes/andromeda.rs +++ b/crates/theme2/src/themes/andromeda.rs @@ -74,6 +74,7 @@ pub fn andromeda() -> UserThemeFamily { error: Some(rgba(0xf82872ff).into()), hint: Some(rgba(0x618399ff).into()), modified: Some(rgba(0xfee56dff).into()), + predictive: Some(rgba(0x315f70ff).into()), success: Some(rgba(0xf7f7f8ff).into()), warning: Some(rgba(0xfee56dff).into()), ..Default::default() diff --git a/crates/theme2/src/themes/atelier.rs b/crates/theme2/src/themes/atelier.rs index 48ff6bfa8a..ca00845053 100644 --- a/crates/theme2/src/themes/atelier.rs +++ b/crates/theme2/src/themes/atelier.rs @@ -75,6 +75,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xba6337ff).into()), hint: Some(rgba(0x768962ff).into()), modified: Some(rgba(0xa59810ff).into()), + predictive: Some(rgba(0x879a72ff).into()), success: Some(rgba(0x22221bff).into()), warning: Some(rgba(0xa59810ff).into()), ..Default::default() @@ -479,6 +480,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xf22d40ff).into()), hint: Some(rgba(0xa87187ff).into()), modified: Some(rgba(0xc38419ff).into()), + predictive: Some(rgba(0x8f5b71ff).into()), success: Some(rgba(0xf1efeeff).into()), warning: Some(rgba(0xc38419ff).into()), ..Default::default() @@ -883,6 +885,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xb1623aff).into()), hint: Some(rgba(0x66847cff).into()), modified: Some(rgba(0xa07e3cff).into()), + predictive: Some(rgba(0x76958cff).into()), success: Some(rgba(0x171c19ff).into()), warning: Some(rgba(0xa07e3cff).into()), ..Default::default() @@ -1287,6 +1290,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xbe4678ff).into()), hint: Some(rgba(0x716998ff).into()), modified: Some(rgba(0xa06e3bff).into()), + predictive: Some(rgba(0x625887ff).into()), success: Some(rgba(0xefecf4ff).into()), warning: Some(rgba(0xa06e3bff).into()), ..Default::default() @@ -1691,6 +1695,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xba6237ff).into()), hint: Some(rgba(0x70825bff).into()), modified: Some(rgba(0xa59810ff).into()), + predictive: Some(rgba(0x5f724cff).into()), success: Some(rgba(0xf4f3ecff).into()), warning: Some(rgba(0xa59810ff).into()), ..Default::default() @@ -2095,6 +2100,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xc94923ff).into()), hint: Some(rgba(0x6d82a6ff).into()), modified: Some(rgba(0xc08b31ff).into()), + predictive: Some(rgba(0x58709aff).into()), success: Some(rgba(0xf5f7ffff).into()), warning: Some(rgba(0xc08b31ff).into()), ..Default::default() @@ -2499,6 +2505,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xc94a23ff).into()), hint: Some(rgba(0x7087b2ff).into()), modified: Some(rgba(0xc08b31ff).into()), + predictive: Some(rgba(0x8599beff).into()), success: Some(rgba(0x202746ff).into()), warning: Some(rgba(0xc08b31ff).into()), ..Default::default() @@ -2903,6 +2910,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xd73837ff).into()), hint: Some(rgba(0xb17272ff).into()), modified: Some(rgba(0xae9515ff).into()), + predictive: Some(rgba(0x9c6262ff).into()), success: Some(rgba(0xfefbecff).into()), warning: Some(rgba(0xae9515ff).into()), ..Default::default() @@ -3307,6 +3315,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xe61c3cff).into()), hint: Some(rgba(0x008b9fff).into()), modified: Some(rgba(0x98981cff).into()), + predictive: Some(rgba(0x00788bff).into()), success: Some(rgba(0xf4fbf4ff).into()), warning: Some(rgba(0x98981cff).into()), ..Default::default() @@ -3711,6 +3720,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xbe4778ff).into()), hint: Some(rgba(0x786e9dff).into()), modified: Some(rgba(0xa06e3cff).into()), + predictive: Some(rgba(0x887fafff).into()), success: Some(rgba(0x19171cff).into()), warning: Some(rgba(0xa06e3cff).into()), ..Default::default() @@ -4115,6 +4125,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xca4949ff).into()), hint: Some(rgba(0x8a647aff).into()), modified: Some(rgba(0xa06e3bff).into()), + predictive: Some(rgba(0x795369ff).into()), success: Some(rgba(0xf4ececff).into()), warning: Some(rgba(0xa06e3bff).into()), ..Default::default() @@ -4519,6 +4530,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xca402cff).into()), hint: Some(rgba(0x8d70a8ff).into()), modified: Some(rgba(0xbb8a36ff).into()), + predictive: Some(rgba(0x765990ff).into()), success: Some(rgba(0xf7f3f7ff).into()), warning: Some(rgba(0xbb8a36ff).into()), ..Default::default() @@ -4923,6 +4935,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xd22e72ff).into()), hint: Some(rgba(0x52809aff).into()), modified: Some(rgba(0x8a8a11ff).into()), + predictive: Some(rgba(0x427088ff).into()), success: Some(rgba(0xebf8ffff).into()), warning: Some(rgba(0x8a8a11ff).into()), ..Default::default() @@ -5327,6 +5340,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xf22e41ff).into()), hint: Some(rgba(0xa67287ff).into()), modified: Some(rgba(0xc3841aff).into()), + predictive: Some(rgba(0xbe899eff).into()), success: Some(rgba(0x1b1918ff).into()), warning: Some(rgba(0xc3841aff).into()), ..Default::default() @@ -5731,6 +5745,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xd73838ff).into()), hint: Some(rgba(0xb37979ff).into()), modified: Some(rgba(0xae9515ff).into()), + predictive: Some(rgba(0xc88a8aff).into()), success: Some(rgba(0x20201dff).into()), warning: Some(rgba(0xae9515ff).into()), ..Default::default() @@ -6135,6 +6150,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xca4a4aff).into()), hint: Some(rgba(0x916a80ff).into()), modified: Some(rgba(0xa06e3cff).into()), + predictive: Some(rgba(0xa27a91ff).into()), success: Some(rgba(0x1b1818ff).into()), warning: Some(rgba(0xa06e3cff).into()), ..Default::default() @@ -6539,6 +6555,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xe61c3dff).into()), hint: Some(rgba(0x008fa1ff).into()), modified: Some(rgba(0x98981dff).into()), + predictive: Some(rgba(0x00a2b5ff).into()), success: Some(rgba(0x131513ff).into()), warning: Some(rgba(0x98981dff).into()), ..Default::default() @@ -6943,6 +6960,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xb16139ff).into()), hint: Some(rgba(0x607e76ff).into()), modified: Some(rgba(0xa07e3bff).into()), + predictive: Some(rgba(0x506d66ff).into()), success: Some(rgba(0xecf4eeff).into()), warning: Some(rgba(0xa07e3bff).into()), ..Default::default() @@ -7347,6 +7365,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xca412cff).into()), hint: Some(rgba(0x8c70a6ff).into()), modified: Some(rgba(0xbb8a36ff).into()), + predictive: Some(rgba(0xa587bfff).into()), success: Some(rgba(0x1b181bff).into()), warning: Some(rgba(0xbb8a36ff).into()), ..Default::default() @@ -7751,6 +7770,7 @@ pub fn atelier() -> UserThemeFamily { error: Some(rgba(0xd22f72ff).into()), hint: Some(rgba(0x5a87a0ff).into()), modified: Some(rgba(0x8a8a11ff).into()), + predictive: Some(rgba(0x6a97b2ff).into()), success: Some(rgba(0x161b1dff).into()), warning: Some(rgba(0x8a8a11ff).into()), ..Default::default() diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rs index 96f8a609de..ad1dbec17a 100644 --- a/crates/theme2/src/themes/ayu.rs +++ b/crates/theme2/src/themes/ayu.rs @@ -75,6 +75,7 @@ pub fn ayu() -> UserThemeFamily { error: Some(rgba(0xef7178ff).into()), hint: Some(rgba(0x638c81ff).into()), modified: Some(rgba(0xfeb454ff).into()), + predictive: Some(rgba(0x5b728cff).into()), success: Some(rgba(0xbfbdb6ff).into()), warning: Some(rgba(0xfeb454ff).into()), ..Default::default() @@ -458,6 +459,7 @@ pub fn ayu() -> UserThemeFamily { error: Some(rgba(0xef7271ff).into()), hint: Some(rgba(0x8ca7c2ff).into()), modified: Some(rgba(0xf1ae4aff).into()), + predictive: Some(rgba(0x9eb9d3ff).into()), success: Some(rgba(0x5c6166ff).into()), warning: Some(rgba(0xf1ae4aff).into()), ..Default::default() @@ -841,6 +843,7 @@ pub fn ayu() -> UserThemeFamily { error: Some(rgba(0xf18779ff).into()), hint: Some(rgba(0x7399a3ff).into()), modified: Some(rgba(0xfed073ff).into()), + predictive: Some(rgba(0x6d839bff).into()), success: Some(rgba(0xcccac2ff).into()), warning: Some(rgba(0xfed073ff).into()), ..Default::default() diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rs index e893f0df72..4f33789481 100644 --- a/crates/theme2/src/themes/gruvbox.rs +++ b/crates/theme2/src/themes/gruvbox.rs @@ -75,6 +75,7 @@ pub fn gruvbox() -> UserThemeFamily { error: Some(rgba(0x9d0408ff).into()), hint: Some(rgba(0x677562ff).into()), modified: Some(rgba(0xb57616ff).into()), + predictive: Some(rgba(0x7d9881ff).into()), success: Some(rgba(0x282828ff).into()), warning: Some(rgba(0xb57616ff).into()), ..Default::default() @@ -465,6 +466,7 @@ pub fn gruvbox() -> UserThemeFamily { error: Some(rgba(0xfb4a35ff).into()), hint: Some(rgba(0x8d957eff).into()), modified: Some(rgba(0xf9bd30ff).into()), + predictive: Some(rgba(0x717363ff).into()), success: Some(rgba(0xfbf1c7ff).into()), warning: Some(rgba(0xf9bd30ff).into()), ..Default::default() @@ -855,6 +857,7 @@ pub fn gruvbox() -> UserThemeFamily { error: Some(rgba(0x9d0408ff).into()), hint: Some(rgba(0x677562ff).into()), modified: Some(rgba(0xb57616ff).into()), + predictive: Some(rgba(0x7d9881ff).into()), success: Some(rgba(0x282828ff).into()), warning: Some(rgba(0xb57616ff).into()), ..Default::default() @@ -1245,6 +1248,7 @@ pub fn gruvbox() -> UserThemeFamily { error: Some(rgba(0xfb4a35ff).into()), hint: Some(rgba(0x8d957eff).into()), modified: Some(rgba(0xf9bd30ff).into()), + predictive: Some(rgba(0x717363ff).into()), success: Some(rgba(0xfbf1c7ff).into()), warning: Some(rgba(0xf9bd30ff).into()), ..Default::default() @@ -1635,6 +1639,7 @@ pub fn gruvbox() -> UserThemeFamily { error: Some(rgba(0x9d0408ff).into()), hint: Some(rgba(0x677562ff).into()), modified: Some(rgba(0xb57616ff).into()), + predictive: Some(rgba(0x7d9881ff).into()), success: Some(rgba(0x282828ff).into()), warning: Some(rgba(0xb57616ff).into()), ..Default::default() @@ -2025,6 +2030,7 @@ pub fn gruvbox() -> UserThemeFamily { error: Some(rgba(0xfb4a35ff).into()), hint: Some(rgba(0x8d957eff).into()), modified: Some(rgba(0xf9bd30ff).into()), + predictive: Some(rgba(0x717363ff).into()), success: Some(rgba(0xfbf1c7ff).into()), warning: Some(rgba(0xf9bd30ff).into()), ..Default::default() diff --git a/crates/theme2/src/themes/one.rs b/crates/theme2/src/themes/one.rs index 8403892c05..cd9db3ca04 100644 --- a/crates/theme2/src/themes/one.rs +++ b/crates/theme2/src/themes/one.rs @@ -75,6 +75,7 @@ pub fn one() -> UserThemeFamily { error: Some(rgba(0xd36151ff).into()), hint: Some(rgba(0x9295beff).into()), modified: Some(rgba(0xdec184ff).into()), + predictive: Some(rgba(0x9c9fc7ff).into()), success: Some(rgba(0x383a41ff).into()), warning: Some(rgba(0xdec184ff).into()), ..Default::default() @@ -465,6 +466,7 @@ pub fn one() -> UserThemeFamily { error: Some(rgba(0xd07277ff).into()), hint: Some(rgba(0x5b708aff).into()), modified: Some(rgba(0xdec184ff).into()), + predictive: Some(rgba(0x5b6b88ff).into()), success: Some(rgba(0xc8ccd4ff).into()), warning: Some(rgba(0xdec184ff).into()), ..Default::default() diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rs index 7dbea0e7b3..71dce71657 100644 --- a/crates/theme2/src/themes/rose_pine.rs +++ b/crates/theme2/src/themes/rose_pine.rs @@ -75,6 +75,7 @@ pub fn rose_pine() -> UserThemeFamily { error: Some(rgba(0xb4647aff).into()), hint: Some(rgba(0x7a92aaff).into()), modified: Some(rgba(0xe99d35ff).into()), + predictive: Some(rgba(0xa2acbeff).into()), success: Some(rgba(0x575279ff).into()), warning: Some(rgba(0xe99d35ff).into()), ..Default::default() @@ -472,6 +473,7 @@ pub fn rose_pine() -> UserThemeFamily { error: Some(rgba(0xea6f92ff).into()), hint: Some(rgba(0x728aa2ff).into()), modified: Some(rgba(0xf5c177ff).into()), + predictive: Some(rgba(0x516b83ff).into()), success: Some(rgba(0xe0def4ff).into()), warning: Some(rgba(0xf5c177ff).into()), ..Default::default() @@ -869,6 +871,7 @@ pub fn rose_pine() -> UserThemeFamily { error: Some(rgba(0xea6f92ff).into()), hint: Some(rgba(0x5e768cff).into()), modified: Some(rgba(0xf5c177ff).into()), + predictive: Some(rgba(0x556b81ff).into()), success: Some(rgba(0xe0def4ff).into()), warning: Some(rgba(0xf5c177ff).into()), ..Default::default() diff --git a/crates/theme2/src/themes/sandcastle.rs b/crates/theme2/src/themes/sandcastle.rs index cf229e615a..74714060bb 100644 --- a/crates/theme2/src/themes/sandcastle.rs +++ b/crates/theme2/src/themes/sandcastle.rs @@ -74,6 +74,7 @@ pub fn sandcastle() -> UserThemeFamily { error: Some(rgba(0xb4637aff).into()), hint: Some(rgba(0x727d68ff).into()), modified: Some(rgba(0xa07e3bff).into()), + predictive: Some(rgba(0x5c6152ff).into()), success: Some(rgba(0xfdf4c1ff).into()), warning: Some(rgba(0xa07e3bff).into()), ..Default::default() diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rs index 6ccf69a02f..fd37545258 100644 --- a/crates/theme2/src/themes/solarized.rs +++ b/crates/theme2/src/themes/solarized.rs @@ -75,6 +75,7 @@ pub fn solarized() -> UserThemeFamily { error: Some(rgba(0xdc3330ff).into()), hint: Some(rgba(0x5889a3ff).into()), modified: Some(rgba(0xb58904ff).into()), + predictive: Some(rgba(0x679aafff).into()), success: Some(rgba(0x002b36ff).into()), warning: Some(rgba(0xb58904ff).into()), ..Default::default() @@ -458,6 +459,7 @@ pub fn solarized() -> UserThemeFamily { error: Some(rgba(0xdc3330ff).into()), hint: Some(rgba(0x4f8297ff).into()), modified: Some(rgba(0xb58903ff).into()), + predictive: Some(rgba(0x40728bff).into()), success: Some(rgba(0xfdf6e3ff).into()), warning: Some(rgba(0xb58903ff).into()), ..Default::default() diff --git a/crates/theme2/src/themes/summercamp.rs b/crates/theme2/src/themes/summercamp.rs index 28858c298d..72cf24fa47 100644 --- a/crates/theme2/src/themes/summercamp.rs +++ b/crates/theme2/src/themes/summercamp.rs @@ -74,6 +74,7 @@ pub fn summercamp() -> UserThemeFamily { error: Some(rgba(0xe35142ff).into()), hint: Some(rgba(0x246e61ff).into()), modified: Some(rgba(0xf1fe29ff).into()), + predictive: Some(rgba(0x79434bff).into()), success: Some(rgba(0xf8f5deff).into()), warning: Some(rgba(0xf1fe29ff).into()), ..Default::default() diff --git a/crates/theme_importer/src/zed1/converter.rs b/crates/theme_importer/src/zed1/converter.rs index 0ef3466978..6b9f22e99d 100644 --- a/crates/theme_importer/src/zed1/converter.rs +++ b/crates/theme_importer/src/zed1/converter.rs @@ -83,6 +83,7 @@ impl Zed1ThemeConverter { warning: convert(diagnostic_summary.icon_color_warning), error: convert(diagnostic_summary.icon_color_error), hint: editor.hint.color.map(zed1_color_to_hsla), + predictive: editor.suggestion.color.map(zed1_color_to_hsla), ..Default::default() }) }