mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 00:13:21 +01:00
add xterm color names to ansi --list
(#7513)
# Description Follow up to #7141 to map @webbedspace's rgb colors to xterm 256 color indexes. Also added the xterm 256 named colors to `ansi --list` in the process. The few dozen or so names that were duplicate in the xterm 256 names from [here](https://www.ditig.com/256-colors-cheat-sheet) were renamed by appending a,b,c,d. So, instead of two blue3's there will be blue3a and blue3b. # User-Facing Changes More colors. # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
This commit is contained in:
parent
774769a7ad
commit
0826e66fe0
@ -279,6 +279,263 @@ pub fn lookup_style(s: &str) -> Style {
|
||||
"defd" | "default_dimmed" => Color::Default.dimmed(),
|
||||
"defr" | "default_reverse" => Color::Default.reverse(),
|
||||
|
||||
// Add xterm 256 colors adding an x prefix where the name conflicts
|
||||
"xblack" | "xterm_black" => Color::Fixed(0).normal(),
|
||||
"maroon" | "xterm_maroon" => Color::Fixed(1).normal(),
|
||||
"xgreen" | "xterm_green" => Color::Fixed(2).normal(),
|
||||
"olive" | "xterm_olive" => Color::Fixed(3).normal(),
|
||||
"navy" | "xterm_navy" => Color::Fixed(4).normal(),
|
||||
"xpurplea" | "xterm_purplea" => Color::Fixed(5).normal(),
|
||||
"teal" | "xterm_teal" => Color::Fixed(6).normal(),
|
||||
"silver" | "xterm_silver" => Color::Fixed(7).normal(),
|
||||
"grey" | "xterm_grey" => Color::Fixed(8).normal(),
|
||||
"xred" | "xterm_red" => Color::Fixed(9).normal(),
|
||||
"lime" | "xterm_lime" => Color::Fixed(10).normal(),
|
||||
"xyellow" | "xterm_yellow" => Color::Fixed(11).normal(),
|
||||
"xblue" | "xterm_blue" => Color::Fixed(12).normal(),
|
||||
"fuchsia" | "xterm_fuchsia" => Color::Fixed(13).normal(),
|
||||
"aqua" | "xterm_aqua" => Color::Fixed(14).normal(),
|
||||
"xwhite" | "xterm_white" => Color::Fixed(15).normal(),
|
||||
"grey0" | "xterm_grey0" => Color::Fixed(16).normal(),
|
||||
"navyblue" | "xterm_navyblue" => Color::Fixed(17).normal(),
|
||||
"darkblue" | "xterm_darkblue" => Color::Fixed(18).normal(),
|
||||
"blue3a" | "xterm_blue3a" => Color::Fixed(19).normal(),
|
||||
"blue3b" | "xterm_blue3b" => Color::Fixed(20).normal(),
|
||||
"blue1" | "xterm_blue1" => Color::Fixed(21).normal(),
|
||||
"darkgreen" | "xterm_darkgreen" => Color::Fixed(22).normal(),
|
||||
"deepskyblue4a" | "xterm_deepskyblue4a" => Color::Fixed(23).normal(),
|
||||
"deepskyblue4b" | "xterm_deepskyblue4b" => Color::Fixed(24).normal(),
|
||||
"deepskyblue4c" | "xterm_deepskyblue4c" => Color::Fixed(25).normal(),
|
||||
"dodgerblue3" | "xterm_dodgerblue3" => Color::Fixed(26).normal(),
|
||||
"dodgerblue2" | "xterm_dodgerblue2" => Color::Fixed(27).normal(),
|
||||
"green4" | "xterm_green4" => Color::Fixed(28).normal(),
|
||||
"springgreen4" | "xterm_springgreen4" => Color::Fixed(29).normal(),
|
||||
"turquoise4" | "xterm_turquoise4" => Color::Fixed(30).normal(),
|
||||
"deepskyblue3a" | "xterm_deepskyblue3a" => Color::Fixed(31).normal(),
|
||||
"deepskyblue3b" | "xterm_deepskyblue3b" => Color::Fixed(32).normal(),
|
||||
"dodgerblue1" | "xterm_dodgerblue1" => Color::Fixed(33).normal(),
|
||||
"green3a" | "xterm_green3a" => Color::Fixed(34).normal(),
|
||||
"springgreen3a" | "xterm_springgreen3a" => Color::Fixed(35).normal(),
|
||||
"darkcyan" | "xterm_darkcyan" => Color::Fixed(36).normal(),
|
||||
"lightseagreen" | "xterm_lightseagreen" => Color::Fixed(37).normal(),
|
||||
"deepskyblue2" | "xterm_deepskyblue2" => Color::Fixed(38).normal(),
|
||||
"deepskyblue1" | "xterm_deepskyblue1" => Color::Fixed(39).normal(),
|
||||
"green3b" | "xterm_green3b" => Color::Fixed(40).normal(),
|
||||
"springgreen3b" | "xterm_springgreen3b" => Color::Fixed(41).normal(),
|
||||
"springgreen2a" | "xterm_springgreen2a" => Color::Fixed(42).normal(),
|
||||
"cyan3" | "xterm_cyan3" => Color::Fixed(43).normal(),
|
||||
"darkturquoise" | "xterm_darkturquoise" => Color::Fixed(44).normal(),
|
||||
"turquoise2" | "xterm_turquoise2" => Color::Fixed(45).normal(),
|
||||
"green1" | "xterm_green1" => Color::Fixed(46).normal(),
|
||||
"springgreen2b" | "xterm_springgreen2b" => Color::Fixed(47).normal(),
|
||||
"springgreen1" | "xterm_springgreen1" => Color::Fixed(48).normal(),
|
||||
"mediumspringgreen" | "xterm_mediumspringgreen" => Color::Fixed(49).normal(),
|
||||
"cyan2" | "xterm_cyan2" => Color::Fixed(50).normal(),
|
||||
"cyan1" | "xterm_cyan1" => Color::Fixed(51).normal(),
|
||||
"darkreda" | "xterm_darkreda" => Color::Fixed(52).normal(),
|
||||
"deeppink4a" | "xterm_deeppink4a" => Color::Fixed(53).normal(),
|
||||
"purple4a" | "xterm_purple4a" => Color::Fixed(54).normal(),
|
||||
"purple4b" | "xterm_purple4b" => Color::Fixed(55).normal(),
|
||||
"purple3" | "xterm_purple3" => Color::Fixed(56).normal(),
|
||||
"blueviolet" | "xterm_blueviolet" => Color::Fixed(57).normal(),
|
||||
"orange4a" | "xterm_orange4a" => Color::Fixed(58).normal(),
|
||||
"grey37" | "xterm_grey37" => Color::Fixed(59).normal(),
|
||||
"mediumpurple4" | "xterm_mediumpurple4" => Color::Fixed(60).normal(),
|
||||
"slateblue3a" | "xterm_slateblue3a" => Color::Fixed(61).normal(),
|
||||
"slateblue3b" | "xterm_slateblue3b" => Color::Fixed(62).normal(),
|
||||
"royalblue1" | "xterm_royalblue1" => Color::Fixed(63).normal(),
|
||||
"chartreuse4" | "xterm_chartreuse4" => Color::Fixed(64).normal(),
|
||||
"darkseagreen4a" | "xterm_darkseagreen4a" => Color::Fixed(65).normal(),
|
||||
"paleturquoise4" | "xterm_paleturquoise4" => Color::Fixed(66).normal(),
|
||||
"steelblue" | "xterm_steelblue" => Color::Fixed(67).normal(),
|
||||
"steelblue3" | "xterm_steelblue3" => Color::Fixed(68).normal(),
|
||||
"cornflowerblue" | "xterm_cornflowerblue" => Color::Fixed(69).normal(),
|
||||
"chartreuse3a" | "xterm_chartreuse3a" => Color::Fixed(70).normal(),
|
||||
"darkseagreen4b" | "xterm_darkseagreen4b" => Color::Fixed(71).normal(),
|
||||
"cadetbluea" | "xterm_cadetbluea" => Color::Fixed(72).normal(),
|
||||
"cadetblueb" | "xterm_cadetblueb" => Color::Fixed(73).normal(),
|
||||
"skyblue3" | "xterm_skyblue3" => Color::Fixed(74).normal(),
|
||||
"steelblue1a" | "xterm_steelblue1a" => Color::Fixed(75).normal(),
|
||||
"chartreuse3b" | "xterm_chartreuse3b" => Color::Fixed(76).normal(),
|
||||
"palegreen3a" | "xterm_palegreen3a" => Color::Fixed(77).normal(),
|
||||
"seagreen3" | "xterm_seagreen3" => Color::Fixed(78).normal(),
|
||||
"aquamarine3" | "xterm_aquamarine3" => Color::Fixed(79).normal(),
|
||||
"mediumturquoise" | "xterm_mediumturquoise" => Color::Fixed(80).normal(),
|
||||
"steelblue1b" | "xterm_steelblue1b" => Color::Fixed(81).normal(),
|
||||
"chartreuse2a" | "xterm_chartreuse2a" => Color::Fixed(82).normal(),
|
||||
"seagreen2" | "xterm_seagreen2" => Color::Fixed(83).normal(),
|
||||
"seagreen1a" | "xterm_seagreen1a" => Color::Fixed(84).normal(),
|
||||
"seagreen1b" | "xterm_seagreen1b" => Color::Fixed(85).normal(),
|
||||
"aquamarine1a" | "xterm_aquamarine1a" => Color::Fixed(86).normal(),
|
||||
"darkslategray2" | "xterm_darkslategray2" => Color::Fixed(87).normal(),
|
||||
"darkredb" | "xterm_darkredb" => Color::Fixed(88).normal(),
|
||||
"deeppink4b" | "xterm_deeppink4b" => Color::Fixed(89).normal(),
|
||||
"darkmagentaa" | "xterm_darkmagentaa" => Color::Fixed(90).normal(),
|
||||
"darkmagentab" | "xterm_darkmagentab" => Color::Fixed(91).normal(),
|
||||
"darkvioleta" | "xterm_darkvioleta" => Color::Fixed(92).normal(),
|
||||
"xpurpleb" | "xterm_purpleb" => Color::Fixed(93).normal(),
|
||||
"orange4b" | "xterm_orange4b" => Color::Fixed(94).normal(),
|
||||
"lightpink4" | "xterm_lightpink4" => Color::Fixed(95).normal(),
|
||||
"plum4" | "xterm_plum4" => Color::Fixed(96).normal(),
|
||||
"mediumpurple3a" | "xterm_mediumpurple3a" => Color::Fixed(97).normal(),
|
||||
"mediumpurple3b" | "xterm_mediumpurple3b" => Color::Fixed(98).normal(),
|
||||
"slateblue1" | "xterm_slateblue1" => Color::Fixed(99).normal(),
|
||||
"yellow4a" | "xterm_yellow4a" => Color::Fixed(100).normal(),
|
||||
"wheat4" | "xterm_wheat4" => Color::Fixed(101).normal(),
|
||||
"grey53" | "xterm_grey53" => Color::Fixed(102).normal(),
|
||||
"lightslategrey" | "xterm_lightslategrey" => Color::Fixed(103).normal(),
|
||||
"mediumpurple" | "xterm_mediumpurple" => Color::Fixed(104).normal(),
|
||||
"lightslateblue" | "xterm_lightslateblue" => Color::Fixed(105).normal(),
|
||||
"yellow4b" | "xterm_yellow4b" => Color::Fixed(106).normal(),
|
||||
"darkolivegreen3a" | "xterm_darkolivegreen3a" => Color::Fixed(107).normal(),
|
||||
"darkseagreen" | "xterm_darkseagreen" => Color::Fixed(108).normal(),
|
||||
"lightskyblue3a" | "xterm_lightskyblue3a" => Color::Fixed(109).normal(),
|
||||
"lightskyblue3b" | "xterm_lightskyblue3b" => Color::Fixed(110).normal(),
|
||||
"skyblue2" | "xterm_skyblue2" => Color::Fixed(111).normal(),
|
||||
"chartreuse2b" | "xterm_chartreuse2b" => Color::Fixed(112).normal(),
|
||||
"darkolivegreen3b" | "xterm_darkolivegreen3b" => Color::Fixed(113).normal(),
|
||||
"palegreen3b" | "xterm_palegreen3b" => Color::Fixed(114).normal(),
|
||||
"darkseagreen3a" | "xterm_darkseagreen3a" => Color::Fixed(115).normal(),
|
||||
"darkslategray3" | "xterm_darkslategray3" => Color::Fixed(116).normal(),
|
||||
"skyblue1" | "xterm_skyblue1" => Color::Fixed(117).normal(),
|
||||
"chartreuse1" | "xterm_chartreuse1" => Color::Fixed(118).normal(),
|
||||
"lightgreena" | "xterm_lightgreena" => Color::Fixed(119).normal(),
|
||||
"lightgreenb" | "xterm_lightgreenb" => Color::Fixed(120).normal(),
|
||||
"palegreen1a" | "xterm_palegreen1a" => Color::Fixed(121).normal(),
|
||||
"aquamarine1b" | "xterm_aquamarine1b" => Color::Fixed(122).normal(),
|
||||
"darkslategray1" | "xterm_darkslategray1" => Color::Fixed(123).normal(),
|
||||
"red3a" | "xterm_red3a" => Color::Fixed(124).normal(),
|
||||
"deeppink4c" | "xterm_deeppink4c" => Color::Fixed(125).normal(),
|
||||
"mediumvioletred" | "xterm_mediumvioletred" => Color::Fixed(126).normal(),
|
||||
"magenta3" | "xterm_magenta3" => Color::Fixed(127).normal(),
|
||||
"darkvioletb" | "xterm_darkvioletb" => Color::Fixed(128).normal(),
|
||||
"purplec" | "xterm_purplec" => Color::Fixed(129).normal(),
|
||||
"darkorange3a" | "xterm_darkorange3a" => Color::Fixed(130).normal(),
|
||||
"indianreda" | "xterm_indianreda" => Color::Fixed(131).normal(),
|
||||
"hotpink3a" | "xterm_hotpink3a" => Color::Fixed(132).normal(),
|
||||
"mediumorchid3" | "xterm_mediumorchid3" => Color::Fixed(133).normal(),
|
||||
"mediumorchid" | "xterm_mediumorchid" => Color::Fixed(134).normal(),
|
||||
"mediumpurple2a" | "xterm_mediumpurple2a" => Color::Fixed(135).normal(),
|
||||
"darkgoldenrod" | "xterm_darkgoldenrod" => Color::Fixed(136).normal(),
|
||||
"lightsalmon3a" | "xterm_lightsalmon3a" => Color::Fixed(137).normal(),
|
||||
"rosybrown" | "xterm_rosybrown" => Color::Fixed(138).normal(),
|
||||
"grey63" | "xterm_grey63" => Color::Fixed(139).normal(),
|
||||
"mediumpurple2b" | "xterm_mediumpurple2b" => Color::Fixed(140).normal(),
|
||||
"mediumpurple1" | "xterm_mediumpurple1" => Color::Fixed(141).normal(),
|
||||
"gold3a" | "xterm_gold3a" => Color::Fixed(142).normal(),
|
||||
"darkkhaki" | "xterm_darkkhaki" => Color::Fixed(143).normal(),
|
||||
"navajowhite3" | "xterm_navajowhite3" => Color::Fixed(144).normal(),
|
||||
"grey69" | "xterm_grey69" => Color::Fixed(145).normal(),
|
||||
"lightsteelblue3" | "xterm_lightsteelblue3" => Color::Fixed(146).normal(),
|
||||
"lightsteelblue" | "xterm_lightsteelblue" => Color::Fixed(147).normal(),
|
||||
"yellow3a" | "xterm_yellow3a" => Color::Fixed(148).normal(),
|
||||
"darkolivegreen3c" | "xterm_darkolivegreen3c" => Color::Fixed(149).normal(),
|
||||
"darkseagreen3b" | "xterm_darkseagreen3b" => Color::Fixed(150).normal(),
|
||||
"darkseagreen2a" | "xterm_darkseagreen2a" => Color::Fixed(151).normal(),
|
||||
"lightcyan3" | "xterm_lightcyan3" => Color::Fixed(152).normal(),
|
||||
"lightskyblue1" | "xterm_lightskyblue1" => Color::Fixed(153).normal(),
|
||||
"greenyellow" | "xterm_greenyellow" => Color::Fixed(154).normal(),
|
||||
"darkolivegreen2" | "xterm_darkolivegreen2" => Color::Fixed(155).normal(),
|
||||
"palegreen1b" | "xterm_palegreen1b" => Color::Fixed(156).normal(),
|
||||
"darkseagreen2b" | "xterm_darkseagreen2b" => Color::Fixed(157).normal(),
|
||||
"darkseagreen1a" | "xterm_darkseagreen1a" => Color::Fixed(158).normal(),
|
||||
"paleturquoise1" | "xterm_paleturquoise1" => Color::Fixed(159).normal(),
|
||||
"red3b" | "xterm_red3b" => Color::Fixed(160).normal(),
|
||||
"deeppink3a" | "xterm_deeppink3a" => Color::Fixed(161).normal(),
|
||||
"deeppink3b" | "xterm_deeppink3b" => Color::Fixed(162).normal(),
|
||||
"magenta3a" | "xterm_magenta3a" => Color::Fixed(163).normal(),
|
||||
"magenta3b" | "xterm_magenta3b" => Color::Fixed(164).normal(),
|
||||
"magenta2a" | "xterm_magenta2a" => Color::Fixed(165).normal(),
|
||||
"darkorange3b" | "xterm_darkorange3b" => Color::Fixed(166).normal(),
|
||||
"indianredb" | "xterm_indianredb" => Color::Fixed(167).normal(),
|
||||
"hotpink3b" | "xterm_hotpink3b" => Color::Fixed(168).normal(),
|
||||
"hotpink2" | "xterm_hotpink2" => Color::Fixed(169).normal(),
|
||||
"orchid" | "xterm_orchid" => Color::Fixed(170).normal(),
|
||||
"mediumorchid1a" | "xterm_mediumorchid1a" => Color::Fixed(171).normal(),
|
||||
"orange3" | "xterm_orange3" => Color::Fixed(172).normal(),
|
||||
"lightsalmon3b" | "xterm_lightsalmon3b" => Color::Fixed(173).normal(),
|
||||
"lightpink3" | "xterm_lightpink3" => Color::Fixed(174).normal(),
|
||||
"pink3" | "xterm_pink3" => Color::Fixed(175).normal(),
|
||||
"plum3" | "xterm_plum3" => Color::Fixed(176).normal(),
|
||||
"violet" | "xterm_violet" => Color::Fixed(177).normal(),
|
||||
"gold3b" | "xterm_gold3b" => Color::Fixed(178).normal(),
|
||||
"lightgoldenrod3" | "xterm_lightgoldenrod3" => Color::Fixed(179).normal(),
|
||||
"tan" | "xterm_tan" => Color::Fixed(180).normal(),
|
||||
"mistyrose3" | "xterm_mistyrose3" => Color::Fixed(181).normal(),
|
||||
"thistle3" | "xterm_thistle3" => Color::Fixed(182).normal(),
|
||||
"plum2" | "xterm_plum2" => Color::Fixed(183).normal(),
|
||||
"yellow3b" | "xterm_yellow3b" => Color::Fixed(184).normal(),
|
||||
"khaki3" | "xterm_khaki3" => Color::Fixed(185).normal(),
|
||||
"lightgoldenrod2" | "xterm_lightgoldenrod2" => Color::Fixed(186).normal(),
|
||||
"lightyellow3" | "xterm_lightyellow3" => Color::Fixed(187).normal(),
|
||||
"grey84" | "xterm_grey84" => Color::Fixed(188).normal(),
|
||||
"lightsteelblue1" | "xterm_lightsteelblue1" => Color::Fixed(189).normal(),
|
||||
"yellow2" | "xterm_yellow2" => Color::Fixed(190).normal(),
|
||||
"darkolivegreen1a" | "xterm_darkolivegreen1a" => Color::Fixed(191).normal(),
|
||||
"darkolivegreen1b" | "xterm_darkolivegreen1b" => Color::Fixed(192).normal(),
|
||||
"darkseagreen1b" | "xterm_darkseagreen1b" => Color::Fixed(193).normal(),
|
||||
"honeydew2" | "xterm_honeydew2" => Color::Fixed(194).normal(),
|
||||
"lightcyan1" | "xterm_lightcyan1" => Color::Fixed(195).normal(),
|
||||
"red1" | "xterm_red1" => Color::Fixed(196).normal(),
|
||||
"deeppink2" | "xterm_deeppink2" => Color::Fixed(197).normal(),
|
||||
"deeppink1a" | "xterm_deeppink1a" => Color::Fixed(198).normal(),
|
||||
"deeppink1b" | "xterm_deeppink1b" => Color::Fixed(199).normal(),
|
||||
"magenta2b" | "xterm_magenta2b" => Color::Fixed(200).normal(),
|
||||
"magenta1" | "xterm_magenta1" => Color::Fixed(201).normal(),
|
||||
"orangered1" | "xterm_orangered1" => Color::Fixed(202).normal(),
|
||||
"indianred1a" | "xterm_indianred1a" => Color::Fixed(203).normal(),
|
||||
"indianred1b" | "xterm_indianred1b" => Color::Fixed(204).normal(),
|
||||
"hotpinka" | "xterm_hotpinka" => Color::Fixed(205).normal(),
|
||||
"hotpinkb" | "xterm_hotpinkb" => Color::Fixed(206).normal(),
|
||||
"mediumorchid1b" | "xterm_mediumorchid1b" => Color::Fixed(207).normal(),
|
||||
"darkorange" | "xterm_darkorange" => Color::Fixed(208).normal(),
|
||||
"salmon1" | "xterm_salmon1" => Color::Fixed(209).normal(),
|
||||
"lightcoral" | "xterm_lightcoral" => Color::Fixed(210).normal(),
|
||||
"palevioletred1" | "xterm_palevioletred1" => Color::Fixed(211).normal(),
|
||||
"orchid2" | "xterm_orchid2" => Color::Fixed(212).normal(),
|
||||
"orchid1" | "xterm_orchid1" => Color::Fixed(213).normal(),
|
||||
"orange1" | "xterm_orange1" => Color::Fixed(214).normal(),
|
||||
"sandybrown" | "xterm_sandybrown" => Color::Fixed(215).normal(),
|
||||
"lightsalmon1" | "xterm_lightsalmon1" => Color::Fixed(216).normal(),
|
||||
"lightpink1" | "xterm_lightpink1" => Color::Fixed(217).normal(),
|
||||
"pink1" | "xterm_pink1" => Color::Fixed(218).normal(),
|
||||
"plum1" | "xterm_plum1" => Color::Fixed(219).normal(),
|
||||
"gold1" | "xterm_gold1" => Color::Fixed(220).normal(),
|
||||
"lightgoldenrod2a" | "xterm_lightgoldenrod2a" => Color::Fixed(221).normal(),
|
||||
"lightgoldenrod2b" | "xterm_lightgoldenrod2b" => Color::Fixed(222).normal(),
|
||||
"navajowhite1" | "xterm_navajowhite1" => Color::Fixed(223).normal(),
|
||||
"mistyrose1" | "xterm_mistyrose1" => Color::Fixed(224).normal(),
|
||||
"thistle1" | "xterm_thistle1" => Color::Fixed(225).normal(),
|
||||
"yellow1" | "xterm_yellow1" => Color::Fixed(226).normal(),
|
||||
"lightgoldenrod1" | "xterm_lightgoldenrod1" => Color::Fixed(227).normal(),
|
||||
"khaki1" | "xterm_khaki1" => Color::Fixed(228).normal(),
|
||||
"wheat1" | "xterm_wheat1" => Color::Fixed(229).normal(),
|
||||
"cornsilk1" | "xterm_cornsilk1" => Color::Fixed(230).normal(),
|
||||
"grey100" | "xterm_grey100" => Color::Fixed(231).normal(),
|
||||
"grey3" | "xterm_grey3" => Color::Fixed(232).normal(),
|
||||
"grey7" | "xterm_grey7" => Color::Fixed(233).normal(),
|
||||
"grey11" | "xterm_grey11" => Color::Fixed(234).normal(),
|
||||
"grey15" | "xterm_grey15" => Color::Fixed(235).normal(),
|
||||
"grey19" | "xterm_grey19" => Color::Fixed(236).normal(),
|
||||
"grey23" | "xterm_grey23" => Color::Fixed(237).normal(),
|
||||
"grey27" | "xterm_grey27" => Color::Fixed(238).normal(),
|
||||
"grey30" | "xterm_grey30" => Color::Fixed(239).normal(),
|
||||
"grey35" | "xterm_grey35" => Color::Fixed(240).normal(),
|
||||
"grey39" | "xterm_grey39" => Color::Fixed(241).normal(),
|
||||
"grey42" | "xterm_grey42" => Color::Fixed(242).normal(),
|
||||
"grey46" | "xterm_grey46" => Color::Fixed(243).normal(),
|
||||
"grey50" | "xterm_grey50" => Color::Fixed(244).normal(),
|
||||
"grey54" | "xterm_grey54" => Color::Fixed(245).normal(),
|
||||
"grey58" | "xterm_grey58" => Color::Fixed(246).normal(),
|
||||
"grey62" | "xterm_grey62" => Color::Fixed(247).normal(),
|
||||
"grey66" | "xterm_grey66" => Color::Fixed(248).normal(),
|
||||
"grey70" | "xterm_grey70" => Color::Fixed(249).normal(),
|
||||
"grey74" | "xterm_grey74" => Color::Fixed(250).normal(),
|
||||
"grey78" | "xterm_grey78" => Color::Fixed(251).normal(),
|
||||
"grey82" | "xterm_grey82" => Color::Fixed(252).normal(),
|
||||
"grey85" | "xterm_grey85" => Color::Fixed(253).normal(),
|
||||
"grey89" | "xterm_grey89" => Color::Fixed(254).normal(),
|
||||
"grey93" | "xterm_grey93" => Color::Fixed(255).normal(),
|
||||
_ => Color::White.normal(),
|
||||
}
|
||||
}
|
||||
|
@ -154,6 +154,264 @@ lazy_static! {
|
||||
AnsiCode{ short_name: Some("defr"), long_name: "default_reverse", code: Color::Default.reverse().prefix().to_string()},
|
||||
AnsiCode{ short_name: Some("bg_def"), long_name: "bg_default", code: Style::new().on(Color::Default).prefix().to_string()},
|
||||
|
||||
// Xterm 256 colors with conflicting names names preceeded by x
|
||||
AnsiCode { short_name: Some("xblack"), long_name: "xterm_black", code: Color::Fixed(0).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("maroon"), long_name: "xterm_maroon", code: Color::Fixed(1).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("xgreen"), long_name: "xterm_green", code: Color::Fixed(2).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("olive"), long_name: "xterm_olive", code: Color::Fixed(3).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("navy"), long_name: "xterm_navy", code: Color::Fixed(4).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("xpurplea"), long_name: "xterm_purplea", code: Color::Fixed(5).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("teal"), long_name: "xterm_teal", code: Color::Fixed(6).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("silver"), long_name: "xterm_silver", code: Color::Fixed(7).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey"), long_name: "xterm_grey", code: Color::Fixed(8).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("xred"), long_name: "xterm_red", code: Color::Fixed(9).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lime"), long_name: "xterm_lime", code: Color::Fixed(10).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("xyellow"), long_name: "xterm_yellow", code: Color::Fixed(11).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("xblue"), long_name: "xterm_blue", code: Color::Fixed(12).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("fuchsia"), long_name: "xterm_fuchsia", code: Color::Fixed(13).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("aqua"), long_name: "xterm_aqua", code: Color::Fixed(14).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("xwhite"), long_name: "xterm_white", code: Color::Fixed(15).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey0"), long_name: "xterm_grey0", code: Color::Fixed(16).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("navyblue"), long_name: "xterm_navyblue", code: Color::Fixed(17).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkblue"), long_name: "xterm_darkblue", code: Color::Fixed(18).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("blue3a"), long_name: "xterm_blue3a", code: Color::Fixed(19).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("blue3b"), long_name: "xterm_blue3b", code: Color::Fixed(20).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("blue1"), long_name: "xterm_blue1", code: Color::Fixed(21).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkgreen"), long_name: "xterm_darkgreen", code: Color::Fixed(22).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deepskyblue4a"), long_name: "xterm_deepskyblue4a", code: Color::Fixed(23).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deepskyblue4b"), long_name: "xterm_deepskyblue4b", code: Color::Fixed(24).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deepskyblue4c"), long_name: "xterm_deepskyblue4c", code: Color::Fixed(25).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("dodgerblue3"), long_name: "xterm_dodgerblue3", code: Color::Fixed(26).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("dodgerblue2"), long_name: "xterm_dodgerblue2", code: Color::Fixed(27).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("green4"), long_name: "xterm_green4", code: Color::Fixed(28).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("springgreen4"), long_name: "xterm_springgreen4", code: Color::Fixed(29).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("turquoise4"), long_name: "xterm_turquoise4", code: Color::Fixed(30).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deepskyblue3a"), long_name: "xterm_deepskyblue3a", code: Color::Fixed(31).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deepskyblue3b"), long_name: "xterm_deepskyblue3b", code: Color::Fixed(32).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("dodgerblue1"), long_name: "xterm_dodgerblue1", code: Color::Fixed(33).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("green3a"), long_name: "xterm_green3a", code: Color::Fixed(34).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("springgreen3a"), long_name: "xterm_springgreen3a", code: Color::Fixed(35).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkcyan"), long_name: "xterm_darkcyan", code: Color::Fixed(36).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightseagreen"), long_name: "xterm_lightseagreen", code: Color::Fixed(37).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deepskyblue2"), long_name: "xterm_deepskyblue2", code: Color::Fixed(38).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deepskyblue1"), long_name: "xterm_deepskyblue1", code: Color::Fixed(39).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("green3b"), long_name: "xterm_green3b", code: Color::Fixed(40).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("springgreen3b"), long_name: "xterm_springgreen3b", code: Color::Fixed(41).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("springgreen2a"), long_name: "xterm_springgreen2a", code: Color::Fixed(42).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("cyan3"), long_name: "xterm_cyan3", code: Color::Fixed(43).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkturquoise"), long_name: "xterm_darkturquoise", code: Color::Fixed(44).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("turquoise2"), long_name: "xterm_turquoise2", code: Color::Fixed(45).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("green1"), long_name: "xterm_green1", code: Color::Fixed(46).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("springgreen2b"), long_name: "xterm_springgreen2b", code: Color::Fixed(47).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("springgreen1"), long_name: "xterm_springgreen1", code: Color::Fixed(48).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumspringgreen"), long_name: "xterm_mediumspringgreen", code: Color::Fixed(49).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("cyan2"), long_name: "xterm_cyan2", code: Color::Fixed(50).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("cyan1"), long_name: "xterm_cyan1", code: Color::Fixed(51).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkreda"), long_name: "xterm_darkreda", code: Color::Fixed(52).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deeppink4a"), long_name: "xterm_deeppink4a", code: Color::Fixed(53).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("purple4a"), long_name: "xterm_purple4a", code: Color::Fixed(54).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("purple4b"), long_name: "xterm_purple4b", code: Color::Fixed(55).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("purple3"), long_name: "xterm_purple3", code: Color::Fixed(56).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("blueviolet"), long_name: "xterm_blueviolet", code: Color::Fixed(57).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("orange4a"), long_name: "xterm_orange4a", code: Color::Fixed(58).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey37"), long_name: "xterm_grey37", code: Color::Fixed(59).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumpurple4"), long_name: "xterm_mediumpurple4", code: Color::Fixed(60).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("slateblue3a"), long_name: "xterm_slateblue3a", code: Color::Fixed(61).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("slateblue3b"), long_name: "xterm_slateblue3b", code: Color::Fixed(62).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("royalblue1"), long_name: "xterm_royalblue1", code: Color::Fixed(63).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("chartreuse4"), long_name: "xterm_chartreuse4", code: Color::Fixed(64).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkseagreen4a"), long_name: "xterm_darkseagreen4a", code: Color::Fixed(65).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("paleturquoise4"), long_name: "xterm_paleturquoise4", code: Color::Fixed(66).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("steelblue"), long_name: "xterm_steelblue", code: Color::Fixed(67).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("steelblue3"), long_name: "xterm_steelblue3", code: Color::Fixed(68).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("cornflowerblue"), long_name: "xterm_cornflowerblue", code: Color::Fixed(69).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("chartreuse3a"), long_name: "xterm_chartreuse3a", code: Color::Fixed(70).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkseagreen4b"), long_name: "xterm_darkseagreen4b", code: Color::Fixed(71).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("cadetbluea"), long_name: "xterm_cadetbluea", code: Color::Fixed(72).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("cadetblueb"), long_name: "xterm_cadetblueb", code: Color::Fixed(73).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("skyblue3"), long_name: "xterm_skyblue3", code: Color::Fixed(74).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("steelblue1a"), long_name: "xterm_steelblue1a", code: Color::Fixed(75).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("chartreuse3b"), long_name: "xterm_chartreuse3b", code: Color::Fixed(76).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("palegreen3a"), long_name: "xterm_palegreen3a", code: Color::Fixed(77).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("seagreen3"), long_name: "xterm_seagreen3", code: Color::Fixed(78).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("aquamarine3"), long_name: "xterm_aquamarine3", code: Color::Fixed(79).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumturquoise"), long_name: "xterm_mediumturquoise", code: Color::Fixed(80).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("steelblue1b"), long_name: "xterm_steelblue1b", code: Color::Fixed(81).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("chartreuse2a"), long_name: "xterm_chartreuse2a", code: Color::Fixed(82).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("seagreen2"), long_name: "xterm_seagreen2", code: Color::Fixed(83).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("seagreen1a"), long_name: "xterm_seagreen1a", code: Color::Fixed(84).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("seagreen1b"), long_name: "xterm_seagreen1b", code: Color::Fixed(85).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("aquamarine1a"), long_name: "xterm_aquamarine1a", code: Color::Fixed(86).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkslategray2"), long_name: "xterm_darkslategray2", code: Color::Fixed(87).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkredb"), long_name: "xterm_darkredb", code: Color::Fixed(88).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deeppink4b"), long_name: "xterm_deeppink4b", code: Color::Fixed(89).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkmagentaa"), long_name: "xterm_darkmagentaa", code: Color::Fixed(90).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkmagentab"), long_name: "xterm_darkmagentab", code: Color::Fixed(91).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkvioleta"), long_name: "xterm_darkvioleta", code: Color::Fixed(92).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("xpurpleb"), long_name: "xterm_purpleb", code: Color::Fixed(93).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("orange4b"), long_name: "xterm_orange4b", code: Color::Fixed(94).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightpink4"), long_name: "xterm_lightpink4", code: Color::Fixed(95).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("plum4"), long_name: "xterm_plum4", code: Color::Fixed(96).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumpurple3a"), long_name: "xterm_mediumpurple3a", code: Color::Fixed(97).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumpurple3b"), long_name: "xterm_mediumpurple3b", code: Color::Fixed(98).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("slateblue1"), long_name: "xterm_slateblue1", code: Color::Fixed(99).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("yellow4a"), long_name: "xterm_yellow4a", code: Color::Fixed(100).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("wheat4"), long_name: "xterm_wheat4", code: Color::Fixed(101).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey53"), long_name: "xterm_grey53", code: Color::Fixed(102).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightslategrey"), long_name: "xterm_lightslategrey", code: Color::Fixed(103).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumpurple"), long_name: "xterm_mediumpurple", code: Color::Fixed(104).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightslateblue"), long_name: "xterm_lightslateblue", code: Color::Fixed(105).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("yellow4b"), long_name: "xterm_yellow4b", code: Color::Fixed(106).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkolivegreen3a"), long_name: "xterm_darkolivegreen3a", code: Color::Fixed(107).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkseagreen"), long_name: "xterm_darkseagreen", code: Color::Fixed(108).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightskyblue3a"), long_name: "xterm_lightskyblue3a", code: Color::Fixed(109).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightskyblue3b"), long_name: "xterm_lightskyblue3b", code: Color::Fixed(110).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("skyblue2"), long_name: "xterm_skyblue2", code: Color::Fixed(111).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("chartreuse2b"), long_name: "xterm_chartreuse2b", code: Color::Fixed(112).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkolivegreen3b"), long_name: "xterm_darkolivegreen3b", code: Color::Fixed(113).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("palegreen3b"), long_name: "xterm_palegreen3b", code: Color::Fixed(114).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkseagreen3a"), long_name: "xterm_darkseagreen3a", code: Color::Fixed(115).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkslategray3"), long_name: "xterm_darkslategray3", code: Color::Fixed(116).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("skyblue1"), long_name: "xterm_skyblue1", code: Color::Fixed(117).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("chartreuse1"), long_name: "xterm_chartreuse1", code: Color::Fixed(118).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightgreena"), long_name: "xterm_lightgreena", code: Color::Fixed(119).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightgreenb"), long_name: "xterm_lightgreenb", code: Color::Fixed(120).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("palegreen1a"), long_name: "xterm_palegreen1a", code: Color::Fixed(121).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("aquamarine1b"), long_name: "xterm_aquamarine1b", code: Color::Fixed(122).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkslategray1"), long_name: "xterm_darkslategray1", code: Color::Fixed(123).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("red3a"), long_name: "xterm_red3a", code: Color::Fixed(124).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deeppink4c"), long_name: "xterm_deeppink4c", code: Color::Fixed(125).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumvioletred"), long_name: "xterm_mediumvioletred", code: Color::Fixed(126).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("magenta3"), long_name: "xterm_magenta3", code: Color::Fixed(127).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkvioletb"), long_name: "xterm_darkvioletb", code: Color::Fixed(128).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("xpurplec"), long_name: "xterm_purplec", code: Color::Fixed(129).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkorange3a"), long_name: "xterm_darkorange3a", code: Color::Fixed(130).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("indianreda"), long_name: "xterm_indianreda", code: Color::Fixed(131).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("hotpink3a"), long_name: "xterm_hotpink3a", code: Color::Fixed(132).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumorchid3"), long_name: "xterm_mediumorchid3", code: Color::Fixed(133).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumorchid"), long_name: "xterm_mediumorchid", code: Color::Fixed(134).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumpurple2a"), long_name: "xterm_mediumpurple2a", code: Color::Fixed(135).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkgoldenrod"), long_name: "xterm_darkgoldenrod", code: Color::Fixed(136).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightsalmon3a"), long_name: "xterm_lightsalmon3a", code: Color::Fixed(137).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("rosybrown"), long_name: "xterm_rosybrown", code: Color::Fixed(138).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey63"), long_name: "xterm_grey63", code: Color::Fixed(139).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumpurple2b"), long_name: "xterm_mediumpurple2b", code: Color::Fixed(140).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumpurple1"), long_name: "xterm_mediumpurple1", code: Color::Fixed(141).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("gold3a"), long_name: "xterm_gold3a", code: Color::Fixed(142).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkkhaki"), long_name: "xterm_darkkhaki", code: Color::Fixed(143).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("navajowhite3"), long_name: "xterm_navajowhite3", code: Color::Fixed(144).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey69"), long_name: "xterm_grey69", code: Color::Fixed(145).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightsteelblue3"), long_name: "xterm_lightsteelblue3", code: Color::Fixed(146).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightsteelblue"), long_name: "xterm_lightsteelblue", code: Color::Fixed(147).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("yellow3a"), long_name: "xterm_yellow3a", code: Color::Fixed(148).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkolivegreen3c"), long_name: "xterm_darkolivegreen3c", code: Color::Fixed(149).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkseagreen3b"), long_name: "xterm_darkseagreen3b", code: Color::Fixed(150).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkseagreen2a"), long_name: "xterm_darkseagreen2a", code: Color::Fixed(151).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightcyan3"), long_name: "xterm_lightcyan3", code: Color::Fixed(152).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightskyblue1"), long_name: "xterm_lightskyblue1", code: Color::Fixed(153).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("greenyellow"), long_name: "xterm_greenyellow", code: Color::Fixed(154).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkolivegreen2"), long_name: "xterm_darkolivegreen2", code: Color::Fixed(155).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("palegreen1b"), long_name: "xterm_palegreen1b", code: Color::Fixed(156).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkseagreen2b"), long_name: "xterm_darkseagreen2b", code: Color::Fixed(157).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkseagreen1a"), long_name: "xterm_darkseagreen1a", code: Color::Fixed(158).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("paleturquoise1"), long_name: "xterm_paleturquoise1", code: Color::Fixed(159).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("red3b"), long_name: "xterm_red3b", code: Color::Fixed(160).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deeppink3a"), long_name: "xterm_deeppink3a", code: Color::Fixed(161).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deeppink3b"), long_name: "xterm_deeppink3b", code: Color::Fixed(162).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("magenta3a"), long_name: "xterm_magenta3a", code: Color::Fixed(163).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("magenta3b"), long_name: "xterm_magenta3b", code: Color::Fixed(164).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("magenta2a"), long_name: "xterm_magenta2a", code: Color::Fixed(165).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkorange3b"), long_name: "xterm_darkorange3b", code: Color::Fixed(166).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("indianredb"), long_name: "xterm_indianredb", code: Color::Fixed(167).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("hotpink3b"), long_name: "xterm_hotpink3b", code: Color::Fixed(168).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("hotpink2"), long_name: "xterm_hotpink2", code: Color::Fixed(169).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("orchid"), long_name: "xterm_orchid", code: Color::Fixed(170).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumorchid1a"), long_name: "xterm_mediumorchid1a", code: Color::Fixed(171).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("orange3"), long_name: "xterm_orange3", code: Color::Fixed(172).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightsalmon3b"), long_name: "xterm_lightsalmon3b", code: Color::Fixed(173).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightpink3"), long_name: "xterm_lightpink3", code: Color::Fixed(174).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("pink3"), long_name: "xterm_pink3", code: Color::Fixed(175).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("plum3"), long_name: "xterm_plum3", code: Color::Fixed(176).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("violet"), long_name: "xterm_violet", code: Color::Fixed(177).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("gold3b"), long_name: "xterm_gold3b", code: Color::Fixed(178).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightgoldenrod3"), long_name: "xterm_lightgoldenrod3", code: Color::Fixed(179).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("tan"), long_name: "xterm_tan", code: Color::Fixed(180).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mistyrose3"), long_name: "xterm_mistyrose3", code: Color::Fixed(181).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("thistle3"), long_name: "xterm_thistle3", code: Color::Fixed(182).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("plum2"), long_name: "xterm_plum2", code: Color::Fixed(183).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("yellow3b"), long_name: "xterm_yellow3b", code: Color::Fixed(184).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("khaki3"), long_name: "xterm_khaki3", code: Color::Fixed(185).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightgoldenrod2"), long_name: "xterm_lightgoldenrod2", code: Color::Fixed(186).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightyellow3"), long_name: "xterm_lightyellow3", code: Color::Fixed(187).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey84"), long_name: "xterm_grey84", code: Color::Fixed(188).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightsteelblue1"), long_name: "xterm_lightsteelblue1", code: Color::Fixed(189).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("yellow2"), long_name: "xterm_yellow2", code: Color::Fixed(190).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkolivegreen1a"), long_name: "xterm_darkolivegreen1a", code: Color::Fixed(191).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkolivegreen1b"), long_name: "xterm_darkolivegreen1b", code: Color::Fixed(192).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkseagreen1b"), long_name: "xterm_darkseagreen1b", code: Color::Fixed(193).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("honeydew2"), long_name: "xterm_honeydew2", code: Color::Fixed(194).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightcyan1"), long_name: "xterm_lightcyan1", code: Color::Fixed(195).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("red1"), long_name: "xterm_red1", code: Color::Fixed(196).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deeppink2"), long_name: "xterm_deeppink2", code: Color::Fixed(197).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deeppink1a"), long_name: "xterm_deeppink1a", code: Color::Fixed(198).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("deeppink1b"), long_name: "xterm_deeppink1b", code: Color::Fixed(199).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("magenta2b"), long_name: "xterm_magenta2b", code: Color::Fixed(200).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("magenta1"), long_name: "xterm_magenta1", code: Color::Fixed(201).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("orangered1"), long_name: "xterm_orangered1", code: Color::Fixed(202).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("indianred1a"), long_name: "xterm_indianred1a", code: Color::Fixed(203).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("indianred1b"), long_name: "xterm_indianred1b", code: Color::Fixed(204).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("hotpinka"), long_name: "xterm_hotpinka", code: Color::Fixed(205).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("hotpinkb"), long_name: "xterm_hotpinkb", code: Color::Fixed(206).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mediumorchid1b"), long_name: "xterm_mediumorchid1b", code: Color::Fixed(207).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("darkorange"), long_name: "xterm_darkorange", code: Color::Fixed(208).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("salmon1"), long_name: "xterm_salmon1", code: Color::Fixed(209).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightcoral"), long_name: "xterm_lightcoral", code: Color::Fixed(210).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("palevioletred1"), long_name: "xterm_palevioletred1", code: Color::Fixed(211).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("orchid2"), long_name: "xterm_orchid2", code: Color::Fixed(212).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("orchid1"), long_name: "xterm_orchid1", code: Color::Fixed(213).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("orange1"), long_name: "xterm_orange1", code: Color::Fixed(214).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("sandybrown"), long_name: "xterm_sandybrown", code: Color::Fixed(215).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightsalmon1"), long_name: "xterm_lightsalmon1", code: Color::Fixed(216).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightpink1"), long_name: "xterm_lightpink1", code: Color::Fixed(217).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("pink1"), long_name: "xterm_pink1", code: Color::Fixed(218).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("plum1"), long_name: "xterm_plum1", code: Color::Fixed(219).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("gold1"), long_name: "xterm_gold1", code: Color::Fixed(220).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightgoldenrod2a"), long_name: "xterm_lightgoldenrod2a", code: Color::Fixed(221).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightgoldenrod2b"), long_name: "xterm_lightgoldenrod2b", code: Color::Fixed(222).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("navajowhite1"), long_name: "xterm_navajowhite1", code: Color::Fixed(223).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("mistyrose1"), long_name: "xterm_mistyrose1", code: Color::Fixed(224).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("thistle1"), long_name: "xterm_thistle1", code: Color::Fixed(225).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("yellow1"), long_name: "xterm_yellow1", code: Color::Fixed(226).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("lightgoldenrod1"), long_name: "xterm_lightgoldenrod1", code: Color::Fixed(227).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("khaki1"), long_name: "xterm_khaki1", code: Color::Fixed(228).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("wheat1"), long_name: "xterm_wheat1", code: Color::Fixed(229).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("cornsilk1"), long_name: "xterm_cornsilk1", code: Color::Fixed(230).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey100"), long_name: "xterm_grey100", code: Color::Fixed(231).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey3"), long_name: "xterm_grey3", code: Color::Fixed(232).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey7"), long_name: "xterm_grey7", code: Color::Fixed(233).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey11"), long_name: "xterm_grey11", code: Color::Fixed(234).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey15"), long_name: "xterm_grey15", code: Color::Fixed(235).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey19"), long_name: "xterm_grey19", code: Color::Fixed(236).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey23"), long_name: "xterm_grey23", code: Color::Fixed(237).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey27"), long_name: "xterm_grey27", code: Color::Fixed(238).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey30"), long_name: "xterm_grey30", code: Color::Fixed(239).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey35"), long_name: "xterm_grey35", code: Color::Fixed(240).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey39"), long_name: "xterm_grey39", code: Color::Fixed(241).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey42"), long_name: "xterm_grey42", code: Color::Fixed(242).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey46"), long_name: "xterm_grey46", code: Color::Fixed(243).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey50"), long_name: "xterm_grey50", code: Color::Fixed(244).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey54"), long_name: "xterm_grey54", code: Color::Fixed(245).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey58"), long_name: "xterm_grey58", code: Color::Fixed(246).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey62"), long_name: "xterm_grey62", code: Color::Fixed(247).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey66"), long_name: "xterm_grey66", code: Color::Fixed(248).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey70"), long_name: "xterm_grey70", code: Color::Fixed(249).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey74"), long_name: "xterm_grey74", code: Color::Fixed(250).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey78"), long_name: "xterm_grey78", code: Color::Fixed(251).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey82"), long_name: "xterm_grey82", code: Color::Fixed(252).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey85"), long_name: "xterm_grey85", code: Color::Fixed(253).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey89"), long_name: "xterm_grey89", code: Color::Fixed(254).prefix().to_string()},
|
||||
AnsiCode { short_name: Some("grey93"), long_name: "xterm_grey93", code: Color::Fixed(255).prefix().to_string()},
|
||||
|
||||
AnsiCode{ short_name: None, long_name: "reset", code: "\x1b[0m".to_owned()},
|
||||
|
||||
// Attributes
|
||||
@ -504,7 +762,7 @@ fn generate_ansi_code_list(
|
||||
let name: Value = Value::string(String::from(ansi_code.long_name), call_span);
|
||||
let short_name = Value::string(ansi_code.short_name.unwrap_or(""), call_span);
|
||||
// The first 102 items in the ansi array are colors
|
||||
let preview = if i < 119 {
|
||||
let preview = if i < 375 {
|
||||
Value::string(format!("{}NUSHELL\u{1b}[0m", &ansi_code.code), call_span)
|
||||
} else {
|
||||
Value::string("\u{1b}[0m", call_span)
|
||||
|
@ -228,23 +228,23 @@ let light_theme = {
|
||||
} else { 'blue_bold' }
|
||||
}
|
||||
duration: dark_gray
|
||||
date: { (date now) - $in |
|
||||
if $in < 1hr {
|
||||
'#e61919'
|
||||
} else if $in < 6hr {
|
||||
'#e68019'
|
||||
} else if $in < 1day {
|
||||
'#e5e619'
|
||||
} else if $in < 3day {
|
||||
'#80e619'
|
||||
} else if $in < 1wk {
|
||||
'#19e619'
|
||||
} else if $in < 6wk {
|
||||
'#19e5e6'
|
||||
} else if $in < 52wk {
|
||||
'#197fe6'
|
||||
} else { 'dark_gray' }
|
||||
}
|
||||
date: { (date now) - $in |
|
||||
if $in < 1hr {
|
||||
'red3b'
|
||||
} else if $in < 6hr {
|
||||
'orange3'
|
||||
} else if $in < 1day {
|
||||
'yellow3b'
|
||||
} else if $in < 3day {
|
||||
'chartreuse2b'
|
||||
} else if $in < 1wk {
|
||||
'green3b'
|
||||
} else if $in < 6wk {
|
||||
'darkturquoise'
|
||||
} else if $in < 52wk {
|
||||
'deepskyblue3b'
|
||||
} else { 'dark_gray' }
|
||||
}
|
||||
range: dark_gray
|
||||
float: dark_gray
|
||||
string: dark_gray
|
||||
|
Loading…
Reference in New Issue
Block a user