Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
ANSI escape code
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== 24-bit ==== As "true color" graphic cards with 16 to 24 bits of color became common, applications began to support 24-bit colors. Terminal emulators supporting setting 24-bit foreground and background colors with escape sequences include Xterm,<ref name="xtc"/> KDE's [[Konsole]],<ref>{{cite web |url=https://quickgit.kde.org/?p=konsole.git&a=blob&f=tests%2Fcolor-spaces.pl |title=color-spaces.pl (a copy of 256colors2.pl from xterm dated 1999-07-11) |publisher=KDE |date=2006-12-06 }}{{Dead link|date=June 2020 |bot=InternetArchiveBot |fix-attempted=yes }}</ref><ref>{{cite web |url=https://invent.kde.org/personalizedrefrigerator/konsole/-/blob/master/doc/user/README.moreColors |title=README.moreColors |publisher=KDE |date=2010-04-22 }}</ref> and iTerm, as well as all libvte based terminals,<ref>{{cite web |url=https://bugzilla.gnome.org/show_bug.cgi?id=704449 |title=libvte's bug report and patches: Support for 16 million colors |publisher=GNOME Bugzilla |date=2014-04-04 |access-date=2016-06-05}}</ref> including [[GNOME Terminal]].<ref>{{cite web|url=https://askubuntu.com/questions/512525/how-to-enable-24bit-true-color-support-in-gnome-terminal|title=How to enable 24bit true color support in Gnome terminal?}}</ref> ESC[38;2;{{angbr|r}};{{angbr|g}};{{angbr|b}}m Select RGB foreground color ESC[48;2;{{angbr|r}};{{angbr|g}};{{angbr|b}}m Select RGB background color The syntax is likely based on the [[ITU]]'s T.416 [[Open Document Architecture]] (ODA) and interchange format: Character content architectures,<ref name="T.416"/> which was adopted as ISO/IEC 8613-6 but ended up as a commercial failure.{{cn|date=February 2022}} The ODA version is more elaborate and thus incompatible: * The parameters after the '2' (r, g, and b) are optional and can be left empty. * Semicolons are replaced by colons, as above. * There is a leading "colorspace ID".<ref name="xtc"/> The definition of the colorspace ID is not included in that specification, so it may be blank to represent the unspecified default. For CMYK color specifications, mintty interprets the colorspace ID parameter as specifying the maximum value which the channel values are given out of (e.g. 100 or 255).<ref name="mintty"/> * In addition to the '2' value after 48 to specify a Red-Green-Blue format (and the '5' above for a 0-255 indexed color), there are alternatives of '0' for implementation-defined and '1' for transparent - neither of which have any further parameters; '3' specifies colors using a Cyan-Magenta-Yellow scheme, and '4' for a Cyan-Magenta-Yellow-Black one, the latter using the position marked as "unused" for the Black component.<ref name="T.416"/> ESC[38:2:{{angbr|Color-Space-ID}}:{{angbr|r}}:{{angbr|g}}:{{angbr|b}}:{{angbr|unused}}:{{angbr|[[Color difference|CS tolerance]]}}:{{angbr|Color-Space}}m Select RGB foreground color ESC[48:2:{{angbr|Color-Space-ID}}:{{angbr|r}}:{{angbr|g}}:{{angbr|b}}:{{angbr|unused}}:{{angbr|CS tolerance}}:{{angbr|Color-Space}}m Select RGB background color where {{code|Color-Space}} indicates the Color-Space associated with the given tolerance: {{code|0}} for CIELUV or {{code|1}} for CIELAB. The ITU-RGB variation is supported by xterm, with the colorspace ID and tolerance parameters ignored. The simpler scheme using semicolons is initially found in Konsole.<ref name="xtc"/>{{rp|at=Can I set a color by its number?}}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
ANSI escape code
(section)
Add topic