Skip to content

Commit da5cd90

Browse files
committed
Ticket #4885, #4896: skins: Move documentation to a separate file
Also slightly reword and update the documentation. Signed-off-by: Egmont Koblinger <[email protected]>
1 parent 2659b14 commit da5cd90

File tree

8 files changed

+111
-84
lines changed

8 files changed

+111
-84
lines changed

misc/skins/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
skindir = $(pkgdatadir)/skins
22

33
skin_DATA = \
4+
README_SKINS.txt \
45
dark.ini \
56
darkfar.ini \
67
default.ini \

misc/skins/README_SKINS.txt

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
This is an overview of the color capabilities of skin files.
2+
3+
See the FAQ for instructions on setting up 256 color or truecolor support in
4+
your terminal.
5+
6+
7+
Color definitions
8+
-----------------
9+
10+
Keywords defining the colors and attributes to be used in a certain context
11+
have the following syntax:
12+
13+
Color definitions have the syntax of
14+
15+
keyword = foreground_color;background_color;attributes
16+
17+
Omitted values fall back to the section's "_default_", or in turn to the
18+
"[core]" section's "_default_".
19+
20+
21+
Legacy 16 color mode
22+
--------------------
23+
24+
If you aim for the highest compatibility with terminals, you should restrict
25+
your skin to the standard 16 colors. These colors each have two names: the
26+
preferred human-friendly one, and a technical one referring to their color
27+
index.
28+
29+
black = color0 gray = color8
30+
red = color1 brightred = color9
31+
green = color2 brightgreen = color10
32+
brown = color3 yellow = color11
33+
blue = color4 brightblue = color12
34+
magenta = color5 brightmagenta = color13
35+
cyan = color6 brightcyan = color14
36+
lightgray = color7 white = color15
37+
38+
With 8 color terminal settings (such as TERM=linux or TERM=xterm), bright
39+
foreground colors (second column) are emulated in mc by enabling the bold
40+
attribute, and the colors are mapped to their darker counterpart (first
41+
column). In turn, the terminal may (or may not) interpret the bold flag as
42+
brighter foreground color, thus reverting to the originally specified bright
43+
foreground.
44+
45+
Even in terminals that support more colors (such as TERM=xterm-256color), the
46+
first 8 foreground colors combined with the bold attribute might be converted
47+
to their brighter counterpart. This depends on choice of the terminal or a
48+
setting thereof, mc having no control over it.
49+
50+
Plus, the exact color values heavily depend on the user's chosen palette.
51+
52+
For all these reasons, a skin using these colors can look quite different
53+
across systems.
54+
55+
56+
256 color extension
57+
-------------------
58+
59+
Almost all graphical terminal emulators support the 256 color extension.
60+
61+
By adding "256colors = true" to the "[skin]" section, you get access to 240
62+
additional colors (a 6x6x6 color cube and a 24 color grayscale ramp) on top of
63+
the standard 16.
64+
65+
Colors of the 6x6x6 cube are called "rgb000" to "rgb555", all three digits
66+
ranging from 0 to 5, corresponding to the R, G and B color components.
67+
Alternatively, you can use their technical color index: "color16" to
68+
"color231".
69+
70+
Colors of the grayscale ramp are "gray0" to "gray23", or "color232" to
71+
"color255".
72+
73+
There are scripts available that display these colors in the terminal (e.g.
74+
"256colors2.pl" shipped in Xterm's source code), as well as web pages showing
75+
them (e.g. https://www.ditig.com/256-colors-cheat-sheet).
76+
77+
78+
Truecolor extension
79+
-------------------
80+
81+
A wide range of terminals support the truecolor extension.
82+
83+
By adding "truecolors = true" to the "[skin]" section (instead of the
84+
"256colors" keyword), you get access to 2^24 (about 16 million) direct colors
85+
on top of the 256 palette ones.
86+
87+
Truecolors are referred to by the standard "#rrggbb" or "#rgb" notation. The
88+
short form is interpreted by repeating each hex digit, e.g. "#5AF" is a
89+
shorthand for "#55AAFF".
90+
91+
92+
Attributes
93+
----------
94+
95+
The third value can specify special attributes to apply. Supported attributes
96+
are:
97+
98+
bold
99+
underline
100+
italic
101+
reverse
102+
blink
103+
104+
Append more with a plus sign, e.g. "bold+italic".
105+
106+
Omitting the field makes it use the fallback value as described above. Use any
107+
unrecognized word (e.g. "none") to prevent fallback and disable all
108+
attributes.
109+

misc/skins/julia256root.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Dark skin with calm colors and good contrast. Mix of the standard & xoria256 skins.
2-
# Color referance https://www.ditig.com/publications/256-colors-cheat-sheet
2+
33
[skin]
44
description = Dark skin with calm colors and good contrast (root)
55
256colors = true

misc/skins/sand256.ini

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,3 @@
1-
# This skin demonstrates how to use 256 colors in mc.
2-
#
3-
# See the FAQ for instructions on setting up 256 colors.
4-
#
5-
# Each of the 256 colors has two names, you can use whichever you prefer.
6-
#
7-
# One possibility is to use the names "color0" to "color255" to access every
8-
# color directly based on their number.
9-
#
10-
# The first 16 colors ("color0" to "color15") can also be specified by their
11-
# names (these names are already being used by mc for 8/16 color terminals):
12-
# black gray
13-
# red brightred
14-
# green brightgreen
15-
# brown yellow
16-
# blue brightblue
17-
# magenta brightmagenta
18-
# cyan brightcyan
19-
# lightgray white
20-
# Note that with 8 color terminal settings (such as TERM=xterm), colors of
21-
# the second column are emulated using the bold attribute (which many
22-
# terminals display as bright colors) for the foreground, and mapped to the
23-
# basic 8 colors for the background. With 16 color terminal settings, the
24-
# actual implementation of bright colors varies across terminals. Most
25-
# terminals show true bright colors for foreground and background. However,
26-
# some terminals show the colors from the first column instead (that is,
27-
# you only have 8 colors), but make them bold. Yet others make them bold
28-
# and bright at the same time. So it is safer to use the rest of the colors
29-
# (color16 to color255).
30-
#
31-
# Colors of the 6x6x6 cube ("color16" to "color231") can alternatively be
32-
# referred to as "rgb000" to "rgb555", all three digits ranging from 0 to 5,
33-
# corresponding to the R, G and B color components.
34-
#
35-
# The 24 grayscale colors ("color232" to "color255") have the aliases "gray0"
36-
# to "gray23".
37-
#
38-
# In addition to the 256 colors, the special word "default" means the
39-
# default foreground or background color of your terminal, while "base" means
40-
# mc's main colors. A missing value means falling back to the _default_ of the
41-
# given section.
42-
#
43-
# Following the foreground and background colors, the third (optional) value
44-
# can specify special attributes to enable. Valid values are bold, underline,
45-
# italic, reverse and blink. Append more with a plus sign, e.g. "bold+italic".
46-
# Leaving the field empty makes it fall back to the attributes of _default_.
47-
# Use any other word (e.g. "none") to prevent fallback and disable all flags.
48-
#
49-
# Italic support requires a recent enough ncurses (>= 5.9.20130831) or slang
50-
# (>= 2.3). All attributes are subject to support by the terminal emulator.
51-
521
[skin]
532
description = Sand skin using 256 colors
543
256colors = true

misc/skins/seasons-autumn16M.ini

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
# The Four Seasons skins demonstrate how to use direct RGB true colors.
2-
#
3-
# See the FAQ for instructions on setting up true colors.
4-
#
5-
# True colors are referred to by the standard #rrggbb or #rgb notation, the
6-
# short form is interpreted by doubling each hex digit.
7-
#
8-
# In addition to these, you can use the basic 8 (non-light) colors and
9-
# the attributes. However, you can't use the 256 indexed colors.
102

113
[skin]
124
# Falling leaves, beautiful forests, Halloween pumpkins.

misc/skins/seasons-spring16M.ini

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
# The Four Seasons skins demonstrate how to use direct RGB true colors.
2-
#
3-
# See the FAQ for instructions on setting up true colors.
4-
#
5-
# True colors are referred to by the standard #rrggbb or #rgb notation, the
6-
# short form is interpreted by doubling each hex digit.
7-
#
8-
# In addition to these the 256 palette colors are still available, and
9-
# obviously so are the attributes. See the sand256.ini skin file for details.
102

113
[skin]
124
# Blooming.

misc/skins/seasons-summer16M.ini

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
# The Four Seasons skins demonstrate how to use direct RGB true colors.
2-
#
3-
# See the FAQ for instructions on setting up true colors.
4-
#
5-
# True colors are referred to by the standard #rrggbb or #rgb notation, the
6-
# short form is interpreted by doubling each hex digit.
7-
#
8-
# In addition to these the 256 palette colors are still available, and
9-
# obviously so are the attributes. See the sand256.ini skin file for details.
102

113
[skin]
124
# Sunshine, ocean, beach, beachball, sunshades, ice cream.

misc/skins/seasons-winter16M.ini

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
# The Four Seasons skins demonstrate how to use direct RGB true colors.
2-
#
3-
# See the FAQ for instructions on setting up true colors.
4-
#
5-
# True colors are referred to by the standard #rrggbb or #rgb notation, the
6-
# short form is interpreted by doubling each hex digit.
7-
#
8-
# In addition to these the 256 palette colors are still available, and
9-
# obviously so are the attributes. See the sand256.ini skin file for details.
102

113
[skin]
124
# The sun is shining and the grass is green,

0 commit comments

Comments
 (0)