diff options
-rw-r--r-- | doc/14_Appendix.md | 15 | ||||
-rw-r--r-- | themes/term/lexer.lua | 27 |
2 files changed, 29 insertions, 13 deletions
diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md index adcafac8..a9d80510 100644 --- a/doc/14_Appendix.md +++ b/doc/14_Appendix.md @@ -132,12 +132,15 @@ in its editing component Scintilla: not supported and `surface->LineTo()` is not supported for drawing marker shapes). * Mouse interactions, cursor types, and hotspots are not supported. -* Only 8 colors are supported: black (0x000000), red (0xFF0000), green - (0x00FF00), yellow (0xFFFF00), blue (0x0000FF), magenta (0xFF00FF), cyan - (0x00FFFF), and white (0xFFFFFF). Even if your terminal uses a different color - map, you must use these color values with Scintilla; unrecognized colors are - set to white by default. Lexers can use up to 8 more colors by setting the - lexer style's "bold" attribute. +* Up to 16 colors are supported: black (`0x000000`), red (`0x800000`), green + (`0x008000`), yellow (`0x808000`), blue (`0x000080`), magenta (`0x800080`), + cyan (`0x008080`), white (`0xC0C0C0`), light black (`0x404040`), light red + (`0xFF0000`), light green (`0x00FF00`), light yellow (`0xFFFF00`), light blue + (`0x0000FF`), light magenta (`0xFF00FF`), light cyan (`0x00FFFF`), and light + white (`0xFFFFFF`). Even if your terminal uses a different color map, you must + use these color values with Scintilla; unrecognized colors are set to white by + default. For some terminals, you may need to set a lexer style's `bold` + attribute in order to use the light color variant. * Scroll bars are not supported. * Some styles settings like font name, font size, and italic do not display properly (terminals use one only font, size and variant). diff --git a/themes/term/lexer.lua b/themes/term/lexer.lua index 6eb34f86..40e570c1 100644 --- a/themes/term/lexer.lua +++ b/themes/term/lexer.lua @@ -9,14 +9,27 @@ local l, color, style = lexer, lexer.color, lexer.style l.colors = { + -- Normal colors. black = color('00', '00', '00'), - red = color('FF', '00', '00'), - green = color('00', 'FF', '00'), - yellow = color('FF', 'FF', '00'), - blue = color('00', '00', 'FF'), - magenta = color('FF', '00', 'FF'), - cyan = color('00', 'FF', 'FF'), - white = color('FF', 'FF', 'FF') + red = color('80', '00', '00'), + green = color('00', '80', '00'), + yellow = color('80', '80', '00'), + blue = color('00', '00', '80'), + magenta = color('80', '00', '80'), + cyan = color('00', '80', '80'), + white = color('C0', 'C0', 'C0'), + + -- Light colors. (16 color terminals only.) + -- These only apply to 16 color terminals. For other terminals, set the + -- style's `bold` attribute to use the light color variant. + light_black = color('40', '40', '40'), + light_red = color('FF', '00', '00'), + light_green = color('00', 'FF', '00'), + light_yellow = color('FF', 'FF', '00'), + light_blue = color('00', '00', 'FF'), + light_magenta = color('FF', '00', 'FF'), + light_cyan = color('00', 'FF', 'FF'), + light_white = color('FF', 'FF', 'FF'), } l.style_nothing = style{ } |