aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormitchell <unknown>2020-08-23 00:17:48 -0400
committermitchell <unknown>2020-08-23 00:17:48 -0400
commit8fb21d5471a9c50151a4c7c7fde35edf922e4daf (patch)
tree5f194e50e5a97846d6c46d3264070415f276d596
parent7e647657b0f95a4756b8aa714b0b3e4295272b81 (diff)
downloadscintilla-mirror-8fb21d5471a9c50151a4c7c7fde35edf922e4daf.tar.gz
lexlua: Documented color restrictions for the curses platform.
-rw-r--r--doc/LPegLexer.html16
-rw-r--r--lexlua/lexer.lua14
2 files changed, 27 insertions, 3 deletions
diff --git a/doc/LPegLexer.html b/doc/LPegLexer.html
index 569b76925..9ec1df49e 100644
--- a/doc/LPegLexer.html
+++ b/doc/LPegLexer.html
@@ -2318,8 +2318,20 @@ operator 30
<h3><code>lexer.colors</code></h3>
- <p>Map of color names strings to color values in <code>0xBBGGRR</code> or <code>"#RRGGBB"</code>
- format.</p>
+ <p>Map of color name strings to color values in <code>0xBBGGRR</code> or <code>"#RRGGBB"</code>
+ format.
+ Note: for applications running within a terminal emulator, only 16 color
+ values are recognized, regardless of how many colors a user&rsquo;s terminal
+ actually supports. (A terminal emulator&rsquo;s settings determines how to actually
+ display these recognized color values, which may end up being mapped to a
+ completely different color set.) In order to use the light variant of a
+ color, some terminals require a style&rsquo;s <code>bold</code> attribute must be set along
+ with that normal color. Recognized color values are black (0x000000), red
+ (0x000080), green (0x008000), yellow (0x008080), blue (0x800000), magenta
+ (0x800080), cyan (0x808000), white (0xC0C0C0), light black (0x404040), light
+ red (0x0000FF), light green (0x00FF00), light yellow (0x00FFFF), light blue
+ (0xFF0000), light magenta (0xFF00FF), light cyan (0xFFFF00), and light white
+ (0xFFFFFF).</p>
<p><a id="lexer.styles"></a></p>
diff --git a/lexlua/lexer.lua b/lexlua/lexer.lua
index 299776297..2f91b0112 100644
--- a/lexlua/lexer.lua
+++ b/lexlua/lexer.lua
@@ -902,8 +902,20 @@ local function searchpath(name, path)
end
---
--- Map of color names strings to color values in `0xBBGGRR` or `"#RRGGBB"`
+-- Map of color name strings to color values in `0xBBGGRR` or `"#RRGGBB"`
-- format.
+-- Note: for applications running within a terminal emulator, only 16 color
+-- values are recognized, regardless of how many colors a user's terminal
+-- actually supports. (A terminal emulator's settings determines how to actually
+-- display these recognized color values, which may end up being mapped to a
+-- completely different color set.) In order to use the light variant of a
+-- color, some terminals require a style's `bold` attribute must be set along
+-- with that normal color. Recognized color values are black (0x000000), red
+-- (0x000080), green (0x008000), yellow (0x008080), blue (0x800000), magenta
+-- (0x800080), cyan (0x808000), white (0xC0C0C0), light black (0x404040), light
+-- red (0x0000FF), light green (0x00FF00), light yellow (0x00FFFF), light blue
+-- (0xFF0000), light magenta (0xFF00FF), light cyan (0xFFFF00), and light white
+-- (0xFFFFFF).
-- @name colors
-- @class table
M.colors = setmetatable({}, {