MUME Help
ANSI CODES
The standard ANSI CGI/SGR codes for setting
character attributes are listed below.
They might not behave the same way on all types of terminals, (this goes especially for the styles) so do not use them where they can create trouble for others.
Foreground Colours High Colours Black... <esc>[30m Black... <esc>[90m Red..... <esc>[31m Red..... <esc>[91m Green... <esc>[32m Green... <esc>[92m Yellow.. <esc>[33m Yellow.. <esc>[93m Blue.... <esc>[34m Blue.... <esc>[94m Magenta. <esc>[35m Magenta. <esc>[95m Cyan.... <esc>[36m Cyan.... <esc>[96m White... <esc>[37m White... <esc>[97m
Background Colours Background High Colours Black... <esc>[40m Black... <esc>[100m Red..... <esc>[41m Red..... <esc>[101m Green... <esc>[42m Green... <esc>[102m Yellow.. <esc>[43m Yellow.. <esc>[103m Blue.... <esc>[44m Blue.... <esc>[104m Magenta. <esc>[45m Magenta. <esc>[105m Cyan.... <esc>[46m Cyan.... <esc>[106m White... <esc>[47m White... <esc>[107m
Text Style Attributes Bold......... <esc>[1m Faint........ <esc>[2m Italic....... <esc>[3m Underline.... <esc>[4m Blink........ <esc>[5m Inverse...... <esc>[7m Ansi off..... <esc>[0mSee https://en.wikipedia.org/wiki/ANSI_escape_code#SGR for further documentation.
8-bit colours
For terminals that support 256 colours,<esc>[38;5;Nm
and
<esc>[48;5;Nm
set the foreground and
background, respectively, to N, one of:
0-7 | standard colours black through white as above |
8-15 | high intensity colours black through white as above |
16-231 | 6×6×6 values of varying red/green/blue intensity |
232-255 | 24 shades of grey, dark to bright |
24-bit colours
For terminals that support 24-bit RGB colours,<esc>[38;2;r;g;bm
sets the
foreground (use 48
for background), where
r, g, and b are the red/green/blue components, each
0-255.
The ITU standard says to use
<esc>[38:2::r:g:bm
instead, but
MUME doesn't use this today.
Underline styles
A few terminals (like kitty) supports underline styles. The following are supported by MUME:
Single line |
<esc>[4m |
Double lines |
<esc>[4:2m |
Curly |
<esc>[4:3m |
Dotted |
<esc>[4:4m |
Dashed |
<esc>[4:5m |
If underline is enabled, the following can be used to specify their colour:
8-bit colour |
<esc>[58:5:<8-bit colour>m |
24-bit colour |
<esc>[58:2:<r>:<g>:<b>m |
More documentation on underline styles is available at https://sw.kovidgoyal.net/kitty/underlines/.
See also: | 256 COLOURS, 24-BIT COLOURS |
Generated on Thu Sep 5 18:09:39 2024