Repository: fujiapple852/trippy (language: rust)

Issue:
Add support for more named colors
Add support for all named colors from:

https://developer.mozilla.org/en-US/docs/Web/CSS/named-color


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5488f4e1a..57bee6f03 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,15 +11,21 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 - Added support for calculating and displaying jitter ([#39](https://github.com/fujiapple852/trippy/issues/39))
 - Added support for customizing columns ([#757](https://github.com/fujiapple852/trippy/issues/757))
-- Added support for [IPinfo](https://ipinfo.io) flavoured `mmdb` files ([#862](https://github.com/fujiapple852/trippy/issues/862))
-- Added support for `IPv4->IPv6` and `IPv6->IPv4` DNS fallback modes ([#864](https://github.com/fujiapple852/trippy/issues/864))
-- Added [TUN](https://en.wikipedia.org/wiki/TUN/TAP) based simulation tests ([#908](https://github.com/fujiapple852/trippy/issues/908))
-- Added support for last src port (`S`) and last dest port (`P`) custom columns ([#974](https://github.com/fujiapple852/trippy/issues/974))
+- Added support for [IPinfo](https://ipinfo.io) flavoured `mmdb`
+  files ([#862](https://github.com/fujiapple852/trippy/issues/862))
+- Added support for `IPv4->IPv6` and `IPv6->IPv4` DNS fallback
+  modes ([#864](https://github.com/fujiapple852/trippy/issues/864))
+- Added [TUN](https://en.wikipedia.org/wiki/TUN/TAP) based simulation
+  tests ([#908](https://github.com/fujiapple852/trippy/issues/908))
+- Added support for last src port (`S`) and last dest port (`P`) custom
+  columns ([#974](https://github.com/fujiapple852/trippy/issues/974))
 - Added support for last sequence (`Q`) custom columns ([#976](https://github.com/fujiapple852/trippy/issues/976))
+- Added support for more named theme colors ([#1011](https://github.com/fujiapple852/trippy/issues/1011))
 
 ### Changed
 
-- Ensure `paris` and `dublin` ECMP strategy are only used with supported protocols ([#848](https://github.com/fujiapple852/trippy/issues/848))
+- Ensure `paris` and `dublin` ECMP strategy are only used with supported
+  protocols ([#848](https://github.com/fujiapple852/trippy/issues/848))
 - Improved Tui table column layout logic ([#925](https://github.com/fujiapple852/trippy/issues/925))
 - Use exclusive reference `&mut` for all Socket operations ([#843](https://github.com/fujiapple852/trippy/issues/843))
 
@@ -28,8 +34,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 - Fixed off-by-one bug in max-rounds calculation ([#906](https://github.com/fujiapple852/trippy/issues/906))
 - Fixed panic with `expand-hosts-max` Tui command ([#892](https://github.com/fujiapple852/trippy/issues/892))
 - Fixed failure to parse generated config file on Windows ([#958](https://github.com/fujiapple852/trippy/issues/958))
-- Fixed tracer panic for `icmp` TimeExceeded "Fragment reassembly time exceeded" packets ([#979](https://github.com/fujiapple852/trippy/issues/979))
-- Fixed tracer not discarding unrelated `icmp` packets for `udp` and `tcp` protocols ([#982](https://github.com/fujiapple852/trippy/issues/982))
+- Fixed tracer panic for `icmp` TimeExceeded "Fragment reassembly time exceeded"
+  packets ([#979](https://github.com/fujiapple852/trippy/issues/979))
+- Fixed tracer not discarding unrelated `icmp` packets for `udp` and `tcp`
+  protocols ([#982](https://github.com/fujiapple852/trippy/issues/982))
 - Fixed incorrect minimum packet size for `IPv6` ([#985](https://github.com/fujiapple852/trippy/issues/985))
 
 ## [0.9.0] - 2023-11-30
diff --git a/README.md b/README.md
index a005ee616..27c9e931a 100644
--- a/README.md
+++ b/README.md
@@ -691,7 +691,7 @@ Options:
 ## Theme Reference
 
 The following table lists the default Tui color theme. These can be overridden with the `--tui-theme-colors` command
-line option.
+line option or in the `theme-colors` section of the configuration file.
 
 | Item                                 | Description                                               | Default      |
 |--------------------------------------|-----------------------------------------------------------|--------------|
@@ -727,16 +727,20 @@ line option.
 | `map-info-panel-bg-color`            | The background color of the map info panel                | `black`      |
 | `map-info-panel-text-color`          | The color of text in the map info panel                   | `gray`       |
 
-The supported colors are:
+The supported [ANSI colors](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) are:
 
 - `Black`, `Red`, `Green`, `Yellow`, `Blue`, `Magenta`, `Cyan`, `Gray`, `DarkGray`, `LightRed`, `LightGreen`, `LightYellow`, `LightBlue`, `LightMagenta`, `LightCyan`, `White`
 
-Color names are case-insensitive and may contain dashes. Raw hex values, such as `ffffff` for white, may also be used.
+In addition, CSS [named colors](https://developer.mozilla.org/en-US/docs/Web/CSS/named-color) (i.e. SkyBlue) and raw hex
+values (i.e. ffffff) may be used but note that these are only supported on some platforms and terminals and may not
+render correctly elsewhere.
+
+Color names are case-insensitive and may contain dashes.
 
 ## Key Bindings Reference
 
 The following table lists the default Tui command key bindings. These can be overridden with the `--tui-key-bindings`
-command line option.
+command line option or in the `bindings` section of the configuration file.
 
 | Command                | Description                                     | Default  |
 |------------------------|-------------------------------------------------|----------|
diff --git a/src/config/theme.rs b/src/config/theme.rs
index 5e818bc54..02b97a869 100644
--- a/src/config/theme.rs
+++ b/src/config/theme.rs
@@ -321,6 +321,7 @@ pub enum TuiThemeItem {
 #[derive(Debug, Clone, Copy, Eq, PartialEq, Deserialize)]
 #[serde(try_from = "String")]
 pub enum TuiColor {
+    // ANSI colors
     Black,
     Red,
     Green,
@@ -337,6 +338,134 @@ pub enum TuiColor {
     LightMagenta,
     LightCyan,
     White,
+    // Other colors
+    AliceBlue,
+    AntiqueWhite,
+    Aqua,
+    Aquamarine,
+    Azure,
+    Beige,
+    Bisque,
+    BlanchedAlmond,
+    BlueViolet,
+    Brown,
+    BurlyWood,
+    CadetBlue,
+    Chartreuse,
+    Chocolate,
+    Coral,
+    CornflowerBlue,
+    CornSilk,
+    Crimson,
+    DarkBlue,
+    DarkCyan,
+    DarkGoldenrod,
+    DarkGreen,
+    DarkKhaki,
+    DarkMagenta,
+    DarkOliveGreen,
+    DarkOrange,
+    DarkOrchid,
+    DarkRed,
+    DarkSalmon,
+    DarkSeaGreen,
+    DarkSlateBlue,
+    DarkSlateGray,
+    DarkTurquoise,
+    DarkViolet,
+    DeepPink,
+    DeepSkyBlue,
+    DimGray,
+    DodgerBlue,
+    Firebrick,
+    FloralWhite,
+    ForestGreen,
+    Fuchsia,
+    Gainsboro,
+    GhostWhite,
+    Gold,
+    Goldenrod,
+    GreenYellow,
+    Honeydew,
+    HotPink,
+    IndianRed,
+    Indigo,
+    Ivory,
+    Khaki,
+    Lavender,
+    LavenderBlush,
+    LawnGreen,
+    LemonChiffon,
+    LightCoral,
+    LightGoldenrodYellow,
+    LightGray,
+    LightPink,
+    LightSalmon,
+    LightSeaGreen,
+    LightSkyBlue,
+    LightSlateGray,
+    LightSteelBlue,
+    Lime,
+    LimeGreen,
+    Linen,
+    Maroon,
+    MediumAquamarine,
+    MediumBlue,
+    MediumOrchid,
+    MediumPurple,
+    MediumSeaGreen,
+    MediumSlateBlue,
+    MediumSpringGreen,
+    MediumTurquoise,
+    MediumVioletRed,
+    MidnightBlue,
+    MintCream,
+    MistyRose,
+    Moccasin,
+    NavajoWhite,
+    Navy,
+    OldLace,
+    Olive,
+    OliveDrab,
+    Orange,
+    OrangeRed,
+    Orchid,
+    PaleGoldenrod,
+    PaleGreen,
+    PaleTurquoise,
+    PaleVioletRed,
+    PapayaWhip,
+    PeachPuff,
+    Peru,
+    Pink,
+    Plum,
+    PowderBlue,
+    Purple,
+    RebeccaPurple,
+    RosyBrown,
+    RoyalBlue,
+    SaddleBrown,
+    Salmon,
+    SandyBrown,
+    SeaGreen,
+    SeaShell,
+    Sienna,
+    Silver,
+    SkyBlue,
+    SlateBlue,
+    SlateGray,
+    Snow,
+    SpringGreen,
+    SteelBlue,
+    Tan,
+    Teal,
+    Thistle,
+    Tomato,
+    Turquoise,
+    Violet,
+    Wheat,
+    WhiteSmoke,
+    YellowGreen,
     Rgb(u8, u8, u8),
 }
 
@@ -351,6 +480,7 @@ impl TryFrom<String> for TuiColor {
 impl TryFrom<&str> for TuiColor {
     type Error = anyhow::Error;
 
+    #[allow(clippy::too_many_lines)]
     fn try_from(value: &str) -> Result<Self, Self::Error> {
         match value.to_ascii_lowercase().replace('-', "").as_ref() {
             "black" => Ok(Self::Black),
@@ -369,6 +499,133 @@ impl TryFrom<&str> for TuiColor {
             "lightmagenta" => Ok(Self::LightMagenta),
             "lightcyan" => Ok(Self::LightCyan),
             "white" => Ok(Self::White),
+            "aliceblue" => Ok(Self::AliceBlue),
+            "antiquewhite" => Ok(Self::AntiqueWhite),
+            "aqua" => Ok(Self::Aqua),
+            "aquamarine" => Ok(Self::Aquamarine),
+            "azure" => Ok(Self::Azure),
+            "beige" => Ok(Self::Beige),
+            "bisque" => Ok(Self::Bisque),
+            "blanchedalmond" => Ok(Self::BlanchedAlmond),
+            "blueviolet" => Ok(Self::BlueViolet),
+            "brown" => Ok(Self::Brown),
+            "burlywood" => Ok(Self::BurlyWood),
+            "cadetblue" => Ok(Self::CadetBlue),
+            "chartreuse" => Ok(Self::Chartreuse),
+            "chocolate" => Ok(Self::Chocolate),
+            "coral" => Ok(Self::Coral),
+            "cornflowerblue" => Ok(Self::CornflowerBlue),
+            "cornsilk" => Ok(Self::CornSilk),
+            "crimson" => Ok(Self::Crimson),
+            "darkblue" => Ok(Self::DarkBlue),
+            "darkcyan" => Ok(Self::DarkCyan),
+            "darkgoldenrod" => Ok(Self::DarkGoldenrod),
+            "darkgreen" => Ok(Self::DarkGreen),
+            "darkkhaki" => Ok(Self::DarkKhaki),
+            "darkmagenta" => Ok(Self::DarkMagenta),
+            "darkolivegreen" => Ok(Self::DarkOliveGreen),
+            "darkorange" => Ok(Self::DarkOrange),
+            "darkorchid" => Ok(Self::DarkOrchid),
+            "darkred" => Ok(Self::DarkRed),
+            "darksalmon" => Ok(Self::DarkSalmon),
+            "darkseagreen" => Ok(Self::DarkSeaGreen),
+            "darkslateblue" => Ok(Self::DarkSlateBlue),
+            "darkslategray" | "darkslategrey" => Ok(Self::DarkSlateGray),
+            "darkturquoise" => Ok(Self::DarkTurquoise),
+            "darkviolet" => Ok(Self::DarkViolet),
+            "deeppink" => Ok(Self::DeepPink),
+            "deepskyblue" => Ok(Self::DeepSkyBlue),
+            "dimgray" | "dimgrey" => Ok(Self::DimGray),
+            "dodgerblue" => Ok(Self::DodgerBlue),
+            "firebrick" => Ok(Self::Firebrick),
+            "floralwhite" => Ok(Self::FloralWhite),
+            "forestgreen" => Ok(Self::ForestGreen),
+            "fuchsia" => Ok(Self::Fuchsia),
+            "gainsboro" => Ok(Self::Gainsboro),
+            "ghostwhite" => Ok(Self::GhostWhite),
+            "gold" => Ok(Self::Gold),
+            "goldenrod" => Ok(Self::Goldenrod),
+            "greenyellow" => Ok(Self::GreenYellow),
+            "honeydew" => Ok(Self::Honeydew),
+            "hotpink" => Ok(Self::HotPink),
+            "indianred" => Ok(Self::IndianRed),
+            "indigo" => Ok(Self::Indigo),
+            "ivory" => Ok(Self::Ivory),
+            "khaki" => Ok(Self::Khaki),
+            "lavender" => Ok(Self::Lavender),
+            "lavenderblush" => Ok(Self::LavenderBlush),
+            "lawngreen" => Ok(Self::LawnGreen),
+            "lemonchiffon" => Ok(Self::LemonChiffon),
+            "lightcoral" => Ok(Self::LightCoral),
+            "lightgoldenrodyellow" => Ok(Self::LightGoldenrodYellow),
+            "lightgray" | "lightgrey" => Ok(Self::LightGray),
+            "lightpink" => Ok(Self::LightPink),
+            "lightsalmon" => Ok(Self::LightSalmon),
+            "lightseagreen" => Ok(Self::LightSeaGreen),
+            "lightskyblue" => Ok(Self::LightSkyBlue),
+            "lightslategray" | "lightslategrey" => Ok(Self::LightSlateGray),
+            "lightsteelblue" => Ok(Self::LightSteelBlue),
+            "lime" => Ok(Self::Lime),
+            "limegreen" => Ok(Self::LimeGreen),
+            "linen" => Ok(Self::Linen),
+            "maroon" => Ok(Self::Maroon),
+            "mediumaquamarine" => Ok(Self::MediumAquamarine),
+            "mediumblue" => Ok(Self::MediumBlue),
+            "mediumorchid" => Ok(Self::MediumOrchid),
+            "mediumpurple" => Ok(Self::MediumPurple),
+            "mediumseagreen" => Ok(Self::MediumSeaGreen),
+            "mediumslateblue" => Ok(Self::MediumSlateBlue),
+            "mediumspringgreen" => Ok(Self::MediumSpringGreen),
+            "mediumturquoise" => Ok(Self::MediumTurquoise),
+            "mediumvioletred" => Ok(Self::MediumVioletRed),
+            "midnightblue" => Ok(Self::MidnightBlue),
+            "mintcream" => Ok(Self::MintCream),
+            "mistyrose" => Ok(Self::MistyRose),
+            "moccasin" => Ok(Self::Moccasin),
+            "navajowhite" => Ok(Self::NavajoWhite),
+            "navy" => Ok(Self::Navy),
+            "oldlace" => Ok(Self::OldLace),
+            "olive" => Ok(Self::Olive),
+            "olivedrab" => Ok(Self::OliveDrab),
+            "orange" => Ok(Self::Orange),
+            "orangered" => Ok(Self::OrangeRed),
+            "orchid" => Ok(Self::Orchid),
+            "palegoldenrod" => Ok(Self::PaleGoldenrod),
+            "palegreen" => Ok(Self::PaleGreen),
+            "paleturquoise" => Ok(Self::PaleTurquoise),
+            "palevioletred" => Ok(Self::PaleVioletRed),
+            "papayawhip" => Ok(Self::PapayaWhip),
+            "peachpuff" => Ok(Self::PeachPuff),
+            "peru" => Ok(Self::Peru),
+            "pink" => Ok(Self::Pink),
+            "plum" => Ok(Self::Plum),
+            "powderblue" => Ok(Self::PowderBlue),
+            "purple" => Ok(Self::Purple),
+            "rebeccapurple" => Ok(Self::RebeccaPurple),
+            "rosybrown" => Ok(Self::RosyBrown),
+            "royalblue" => Ok(Self::RoyalBlue),
+            "saddlebrown" => Ok(Self::SaddleBrown),
+            "salmon" => Ok(Self::Salmon),
+            "sandybrown" => Ok(Self::SandyBrown),
+            "seagreen" => Ok(Self::SeaGreen),
+            "seashell" => Ok(Self::SeaShell),
+            "sienna" => Ok(Self::Sienna),
+            "silver" => Ok(Self::Silver),
+            "skyblue" => Ok(Self::SkyBlue),
+            "slateblue" => Ok(Self::SlateBlue),
+            "slategray" | "slategrey" => Ok(Self::SlateGray),
+            "snow" => Ok(Self::Snow),
+            "springgreen" => Ok(Self::SpringGreen),
+            "steelblue" => Ok(Self::SteelBlue),
+            "tan" => Ok(Self::Tan),
+            "teal" => Ok(Self::Teal),
+            "thistle" => Ok(Self::Thistle),
+            "tomato" => Ok(Self::Tomato),
+            "turquoise" => Ok(Self::Turquoise),
+            "violet" => Ok(Self::Violet),
+            "wheat" => Ok(Self::Wheat),
+            "whitesmoke" => Ok(Self::WhiteSmoke),
+            "yellowgreen" => Ok(Self::YellowGreen),
             rgb_hex if value.len() == 6 && value.chars().all(|c| c.is_ascii_hexdigit()) => {
                 let red = u8::from_str_radix(&rgb_hex[0..2], 16)?;
                 let green = u8::from_str_radix(&rgb_hex[2..4], 16)?;
diff --git a/src/frontend/theme.rs b/src/frontend/theme.rs
index de880e053..028b39c9d 100644
--- a/src/frontend/theme.rs
+++ b/src/frontend/theme.rs
@@ -117,6 +117,7 @@ impl From<TuiTheme> for Theme {
 }
 
 impl From<TuiColor> for Color {
+    #[allow(clippy::too_many_lines)]
     fn from(value: TuiColor) -> Self {
         match value {
             TuiColor::Black => Self::Black,
@@ -135,6 +136,133 @@ impl From<TuiColor> for Color {
             TuiColor::LightMagenta => Self::LightMagenta,
             TuiColor::LightCyan => Self::LightCyan,
             TuiColor::White => Self::White,
+            TuiColor::AliceBlue => Self::from_u32(0x00f0_f8ff),
+            TuiColor::AntiqueWhite => Self::from_u32(0x00fa_ebd7),
+            TuiColor::Aqua => Self::from_u32(0x0000_ffff),
+            TuiColor::Aquamarine => Self::from_u32(0x007f_ffd4),
+            TuiColor::Azure => Self::from_u32(0x00f0_ffff),
+            TuiColor::Beige => Self::from_u32(0x00f5_f5dc),
+            TuiColor::Bisque => Self::from_u32(0x00ff_e4c4),
+            TuiColor::BlanchedAlmond => Self::from_u32(0x00ff_ebcd),
+            TuiColor::BlueViolet => Self::from_u32(0x008a_2be2),
+            TuiColor::Brown => Self::from_u32(0x00a5_2a2a),
+            TuiColor::BurlyWood => Self::from_u32(0x00de_b887),
+            TuiColor::CadetBlue => Self::from_u32(0x005f_9ea0),
+            TuiColor::Chartreuse => Self::from_u32(0x007f_ff00),
+            TuiColor::Chocolate => Self::from_u32(0x00d2_691e),
+            TuiColor::Coral => Self::from_u32(0x00ff_7f50),
+            TuiColor::CornflowerBlue => Self::from_u32(0x0064_95ed),
+            TuiColor::CornSilk => Self::from_u32(0x00ff_f8dc),
+            TuiColor::Crimson => Self::from_u32(0x00dc_143c),
+            TuiColor::DarkBlue => Self::from_u32(0x0000_008b),
+            TuiColor::DarkCyan => Self::from_u32(0x0000_8b8b),
+            TuiColor::DarkGoldenrod => Self::from_u32(0x00b8_860b),
+            TuiColor::DarkGreen => Self::from_u32(0x0000_6400),
+            TuiColor::DarkKhaki => Self::from_u32(0x00bd_b76b),
+            TuiColor::DarkMagenta => Self::from_u32(0x008b_008b),
+            TuiColor::DarkOliveGreen => Self::from_u32(0x0055_6b2f),
+            TuiColor::DarkOrange => Self::from_u32(0x00ff_8c00),
+            TuiColor::DarkOrchid => Self::from_u32(0x0099_32cc),
+            TuiColor::DarkRed => Self::from_u32(0x008b_0000),
+            TuiColor::DarkSalmon => Self::from_u32(0x00e9_967a),
+            TuiColor::DarkSeaGreen => Self::from_u32(0x008f_bc8f),
+            TuiColor::DarkSlateBlue => Self::from_u32(0x0048_3d8b),
+            TuiColor::DarkSlateGray => Self::from_u32(0x002f_4f4f),
+            TuiColor::DarkTurquoise => Self::from_u32(0x0000_ced1),
+            TuiColor::DarkViolet => Self::from_u32(0x0094_00d3),
+            TuiColor::DeepPink => Self::from_u32(0x00ff_1493),
+            TuiColor::DeepSkyBlue => Self::from_u32(0x0000_bfff),
+            TuiColor::DimGray => Self::from_u32(0x0069_6969),
+            TuiColor::DodgerBlue => Self::from_u32(0x001e_90ff),
+            TuiColor::Firebrick => Self::from_u32(0x00b2_2222),
+            TuiColor::FloralWhite => Self::from_u32(0x00ff_faf0),
+            TuiColor::ForestGreen => Self::from_u32(0x0022_8b22),
+            TuiColor::Fuchsia => Self::from_u32(0x00ff_00ff),
+            TuiColor::Gainsboro => Self::from_u32(0x00dc_dcdc),
+            TuiColor::GhostWhite => Self::from_u32(0x00f8_f8ff),
+            TuiColor::Gold => Self::from_u32(0x00ff_d700),
+            TuiColor::Goldenrod => Self::from_u32(0x00da_a520),
+            TuiColor::GreenYellow => Self::from_u32(0x00ad_ff2f),
+            TuiColor::Honeydew => Self::from_u32(0x00f0_fff0),
+            TuiColor::HotPink => Self::from_u32(0x00ff_69b4),
+            TuiColor::IndianRed => Self::from_u32(0x00cd_5c5c),
+            TuiColor::Indigo => Self::from_u32(0x004b_0082),
+            TuiColor::Ivory => Self::from_u32(0x00ff_fff0),
+            TuiColor::Khaki => Self::from_u32(0x00f0_e68c),
+            TuiColor::Lavender => Self::from_u32(0x00e6_e6fa),
+            TuiColor::LavenderBlush => Self::from_u32(0x00ff_f0f5),
+            TuiColor::LawnGreen => Self::from_u32(0x007c_fc00),
+            TuiColor::LemonChiffon => Self::from_u32(0x00ff_facd),
+            TuiColor::LightCoral => Self::from_u32(0x00f0_8080),
+            TuiColor::LightGoldenrodYellow => Self::from_u32(0x00fa_fad2),
+            TuiColor::LightGray => Self::from_u32(0x00d3_d3d3),
+            TuiColor::LightPink => Self::from_u32(0x00ff_b6c1),
+            TuiColor::LightSalmon => Self::from_u32(0x00ff_a07a),
+            TuiColor::LightSeaGreen => Self::from_u32(0x0020_b2aa),
+            TuiColor::LightSkyBlue => Self::from_u32(0x0087_cefa),
+            TuiColor::LightSlateGray => Self::from_u32(0x0077_8899),
+            TuiColor::LightSteelBlue => Self::from_u32(0x00b0_c4de),
+            TuiColor::Lime => Self::from_u32(0x0000_ff00),
+            TuiColor::LimeGreen => Self::from_u32(0x0032_cd32),
+            TuiColor::Linen => Self::from_u32(0x00fa_f0e6),
+            TuiColor::Maroon => Self::from_u32(0x0080_0000),
+            TuiColor::MediumAquamarine => Self::from_u32(0x0066_cdaa),
+            TuiColor::MediumBlue => Self::from_u32(0x0000_00cd),
+            TuiColor::MediumOrchid => Self::from_u32(0x00ba_55d3),
+            TuiColor::MediumPurple => Self::from_u32(0x0093_70db),
+            TuiColor::MediumSeaGreen => Self::from_u32(0x003c_b371),
+            TuiColor::MediumSlateBlue => Self::from_u32(0x007b_68ee),
+            TuiColor::MediumSpringGreen => Self::from_u32(0x0000_fa9a),
+            TuiColor::MediumTurquoise => Self::from_u32(0x0048_d1cc),
+            TuiColor::MediumVioletRed => Self::from_u32(0x00c7_1585),
+            TuiColor::MidnightBlue => Self::from_u32(0x0019_1970),
+            TuiColor::MintCream => Self::from_u32(0x00f5_fffa),
+            TuiColor::MistyRose => Self::from_u32(0x00ff_e4e1),
+            TuiColor::Moccasin => Self::from_u32(0x00ff_e4b5),
+            TuiColor::NavajoWhite => Self::from_u32(0x00ff_dead),
+            TuiColor::Navy => Self::from_u32(0x0000_0080),
+            TuiColor::OldLace => Self::from_u32(0x00fd_f5e6),
+            TuiColor::Olive => Self::from_u32(0x0080_8000),
+            TuiColor::OliveDrab => Self::from_u32(0x006b_8e23),
+            TuiColor::Orange => Self::from_u32(0x00ff_a500),
+            TuiColor::OrangeRed => Self::from_u32(0x00ff_4500),
+            TuiColor::Orchid => Self::from_u32(0x00da_70d6),
+            TuiColor::PaleGoldenrod => Self::from_u32(0x00ee_e8aa),
+            TuiColor::PaleGreen => Self::from_u32(0x0098_fb98),
+            TuiColor::PaleTurquoise => Self::from_u32(0x00af_eeee),
+            TuiColor::PaleVioletRed => Self::from_u32(0x00db_7093),
+            TuiColor::PapayaWhip => Self::from_u32(0x00ff_efd5),
+            TuiColor::PeachPuff => Self::from_u32(0x00ff_dab9),
+            TuiColor::Peru => Self::from_u32(0x00cd_853f),
+            TuiColor::Pink => Self::from_u32(0x00ff_c0cb),
+            TuiColor::Plum => Self::from_u32(0x00dd_a0dd),
+            TuiColor::PowderBlue => Self::from_u32(0x00b0_e0e6),
+            TuiColor::Purple => Self::from_u32(0x0080_0080),
+            TuiColor::RebeccaPurple => Self::from_u32(0x0066_3399),
+            TuiColor::RosyBrown => Self::from_u32(0x00bc_8f8f),
+            TuiColor::RoyalBlue => Self::from_u32(0x0041_69e1),
+            TuiColor::SaddleBrown => Self::from_u32(0x008b_4513),
+            TuiColor::Salmon => Self::from_u32(0x00fa_8072),
+            TuiColor::SandyBrown => Self::from_u32(0x00f4_a460),
+            TuiColor::SeaGreen => Self::from_u32(0x002e_8b57),
+            TuiColor::SeaShell => Self::from_u32(0x00ff_f5ee),
+            TuiColor::Sienna => Self::from_u32(0x00a0_522d),
+            TuiColor::Silver => Self::from_u32(0x00c0_c0c0),
+            TuiColor::SkyBlue => Self::from_u32(0x0087_ceeb),
+            TuiColor::SlateBlue => Self::from_u32(0x006a_5acd),
+            TuiColor::SlateGray => Self::from_u32(0x0070_8090),
+            TuiColor::Snow => Self::from_u32(0x00ff_fafa),
+            TuiColor::SpringGreen => Self::from_u32(0x0000_ff7f),
+            TuiColor::SteelBlue => Self::from_u32(0x0046_82b4),
+            TuiColor::Tan => Self::from_u32(0x00d2_b48c),
+            TuiColor::Teal => Self::from_u32(0x0000_8080),
+            TuiColor::Thistle => Self::from_u32(0x00d8_bfd8),
+            TuiColor::Tomato => Self::from_u32(0x00ff_6347),
+            TuiColor::Turquoise => Self::from_u32(0x0040_e0d0),
+            TuiColor::Violet => Self::from_u32(0x00ee_82ee),
+            TuiColor::Wheat => Self::from_u32(0x00f5_deb3),
+            TuiColor::WhiteSmoke => Self::from_u32(0x00f5_f5f5),
+            TuiColor::YellowGreen => Self::from_u32(0x009a_cd32),
             TuiColor::Rgb(r, g, b) => Self::Rgb(r, g, b),
         }
     }
diff --git a/trippy-config-sample.toml b/trippy-config-sample.toml
index bfc63becb..e72fda7d7 100644
--- a/trippy-config-sample.toml
+++ b/trippy-config-sample.toml
@@ -321,12 +321,15 @@ tui-privacy-max-ttl = 0
 
 # Tui color theme configure.
 #
-# The allowed colors values are:
+# The supported ANSI color values are:
 #   Black, Red, Green, Yellow, Blue, Magenta, Cyan, Gray, DarkGray, LightRed,
 #   LightGreen, LightYellow, LightBlue, LightMagenta, LightCyan, White
 #
-# Color names are case-insensitive and may contain dashes. Raw hex values,
-# such as ffffff for white, may also be used.
+# In addition, CSS named colors (i.e. SkyBlue) and raw hex values (i.e. ffffff)
+# may be used but note that these are only supported on some platforms and
+# terminals and may not render correctly elsewhere.
+#
+# Color names are case-insensitive and may contain dashes.
 #
 # See https://github.com/fujiapple852/trippy#theme-reference for details.
 [theme-colors]


Test patch: