summaryrefslogtreecommitdiff
path: root/doc/misc/efaq.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/misc/efaq.texi')
-rw-r--r--doc/misc/efaq.texi33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index f7a47f8675a..e9cfe7afce9 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -1491,6 +1491,39 @@ exhibits all the colors Emacs knows about on the current display.
Syntax highlighting is on by default since version 22.1.
+Emacs 26.1 and later support direct color mode in terminals. If Emacs
+finds Terminfo capabilities @samp{setb24} and @samp{setf24}, 24-bit
+direct color mode is used. The capability strings are expected to
+take one 24-bit pixel value as argument and transform the pixel to a
+string that can be used to send 24-bit colors to the terminal.
+
+There aren't yet any standard terminal type definitions that would
+support the capabilities, but Emacs can be invoked with a custom
+definition as shown below.
+
+@example
+$ cat terminfo-24bit.src
+
+# Use colon separators.
+xterm-24bit|xterm with 24-bit direct color mode,
+ use=xterm-256color,
+ setb24=\E[48:2:%p1%@{65536@}%/%d:%p1%@{256@}%/%@{255@}%&%d:%p1%@{255@}%&%dm,
+ setf24=\E[38:2:%p1%@{65536@}%/%d:%p1%@{256@}%/%@{255@}%&%d:%p1%@{255@}%&%dm,
+# Use semicolon separators.
+xterm-24bits|xterm with 24-bit direct color mode,
+ use=xterm-256color,
+ setb24=\E[48;2;%p1%@{65536@}%/%d;%p1%@{256@}%/%@{255@}%&%d;%p1%@{255@}%&%dm,
+ setf24=\E[38;2;%p1%@{65536@}%/%d;%p1%@{256@}%/%@{255@}%&%d;%p1%@{255@}%&%dm,
+
+$ tic -x -o ~/.terminfo terminfo-24bit.src
+
+$ TERM=xterm-24bit emacs -nw
+@end example
+
+Currently there's no standard way to determine whether a terminal
+supports direct color mode. If such standard arises later on, support
+for @samp{setb24} and @samp{setf24} may be removed.
+
@node Debugging a customization file
@section How do I debug a @file{.emacs} file?
@cindex Debugging @file{.emacs} file