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!
==== Unix environment variables relating to color support ==== Rather than using the color support in termcap and terminfo introduced in SVr3.2 (1987),<ref>{{cite manual |url=https://invisible-island.net/ncurses/man/curs_color.3x.html#h2-HISTORY |section=History |title=curs_color(3X) - manipulate terminal colors with curses }}</ref> the S-Lang library (version 0.99-32, June 1996) used a separate environment variable {{code|$COLORTERM}} to indicate whether a terminal emulator could use colors at all, and later added values to indicate if it supported 24-bit color.<ref>{{cite web |title=Midnight Commander: lib/tty/color-slang.c|website=Fossies |url=https://fossies.org/linux/mc/lib/tty/color-slang.c}}</ref><ref name=ncurses-on-slang>{{cite web |first=Thomas E. | last=Dickey |title=NCURSES β comments on S-Lang |url=https://invisible-island.net/ncurses/ncurses-slang.html |year=2017 |website=invisible-island.net}}</ref> This system, although poorly documented, became widespread enough for Fedora and RHEL to consider using it as a simpler and more universal detection mechanism compared to querying the now-updated libraries.<ref>{{cite web |title=Features/256 Color Terminals - Fedora Project Wiki |url=https://fedoraproject.org/wiki/Features/256_Color_Terminals#Scope |website=Fedora Project |archive-url=https://web.archive.org/web/20121004184942/https://fedoraproject.org/wiki/Features/256_Color_Terminals#Scope|archive-date=4 October 2012|url-status=live}}</ref> Some terminal emulators (urxvt, konsole) set {{code|$COLORFGBG}} to report the color scheme of the terminal (mainly light vs. dark background). This behavior originated in S-Lang<ref name=ncurses-on-slang/> and is used by vim. Gnome-terminal refuses to add this behavior, as the syntax for the value is not agreed upon, the value cannot be changed upon a runtime change of the palette, and more "proper" xterm OSC 4/10/11 sequences already exist.<ref>{{cite web |title=Bug 733423 β Please set COLORFGBG environment variable for automatic color detection |url=https://bugzilla.gnome.org/show_bug.cgi?id=733423 |website=bugzilla.gnome.org}}</ref>
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