Просмотр исходного кода

feat: add bright colour options, change punctuation default

PThorpe92 2 лет назад
Родитель
Сommit
2f629fbcd0
2 измененных файлов с 19 добавлено и 2 удалено
  1. 1 1
      src/theme/default_theme.rs
  2. 18 1
      src/theme/lsc.rs

+ 1 - 1
src/theme/default_theme.rs

@@ -78,7 +78,7 @@ impl UiStyles {
                 },
             },
 
-            punctuation:  Black.bold(),
+            punctuation:  DarkGray.bold(),
             date:         Blue.normal(),
             inode:        Purple.normal(),
             blocks:       Cyan.normal(),

+ 18 - 1
src/theme/lsc.rs

@@ -118,6 +118,15 @@ impl<'var> Pair<'var> {
                 "35" => style = style.fg(Purple),
                 "36" => style = style.fg(Cyan),
                 "37" => style = style.fg(White),
+                // Bright foreground colours
+                "90" => style = style.fg(DarkGray),
+                "91" => style = style.fg(BrightRed),
+                "92" => style = style.fg(BrightGreen),
+                "93" => style = style.fg(BrightYellow),
+                "94" => style = style.fg(BrightBlue),
+                "95" => style = style.fg(BrightPurple),
+                "96" => style = style.fg(BrightCyan),
+                "97" => style = style.fg(BrightGray),
                 "38" => if let Some(c) = parse_into_high_colour(&mut iter) { style = style.fg(c) },
 
                 // Background colours
@@ -129,8 +138,16 @@ impl<'var> Pair<'var> {
                 "45" => style = style.on(Purple),
                 "46" => style = style.on(Cyan),
                 "47" => style = style.on(White),
+                // Bright background colours
+                "100" => style = style.on(DarkGray),
+                "101" => style = style.on(BrightRed),
+                "102" => style = style.on(BrightGreen),
+                "103" => style = style.on(BrightYellow),
+                "104" => style = style.on(BrightBlue),
+                "105" => style = style.on(BrightPurple),
+                "106" => style = style.on(BrightCyan),
+                "107" => style = style.on(BrightGray),
                 "48" => if let Some(c) = parse_into_high_colour(&mut iter) { style = style.on(c) },
-
                  _   => {/* ignore the error and do nothing */},
             }
         }