Browse Source

fix: terminal ANSI base palette lifted for the dark background (blue #000080 was unreadable)

clanker 1 tháng trước cách đây
mục cha
commit
73d860e2ed
1 tập tin đã thay đổi với 8 bổ sung và 4 xóa
  1. 8 4
      src/pages/task_terminal.html

+ 8 - 4
src/pages/task_terminal.html

@@ -36,10 +36,14 @@
                     var state = null;   // {bold, italic, fg, bg}
                     var CSI = /\x1b\[([0-9;:]*)([A-Za-z])/;
 
-                    var BASE = ['#000000', '#800000', '#008000', '#808000',
-                                '#000080', '#800080', '#008080', '#c0c0c0',
-                                '#808080', '#ff0000', '#00ff00', '#ffff00',
-                                '#0000ff', '#ff00ff', '#00ffff', '#ffffff'];
+                    // Base 16 tuned for the dark terminal background: the
+                    // stock VGA palette (blue #000080 etc.) is unreadable
+                    // here, so both halves use lifted, dark-theme-friendly
+                    // values (VS Code-style).
+                    var BASE = ['#666666', '#cd3131', '#0dbc79', '#e5e510',
+                                '#2472c8', '#bc3fbc', '#29b8db', '#e5e5e5',
+                                '#8c8c8c', '#f14c4c', '#23d18b', '#f5f543',
+                                '#3b8eea', '#d670d6', '#43d4e8', '#ffffff'];
                     var LEVELS = [0, 95, 135, 175, 215, 255];
                     function colour256(n) {
                         if (n < 16) return BASE[n];