~ubuntu-branches/ubuntu/utopic/kdebase/utopic

« back to all changes in this revision

Viewing changes to konsole/doc/user/README.moreColors

  • Committer: Bazaar Package Importer
  • Author(s): Debian Qt/KDE Maintainers, José Manuel Santamaría Lema, Modestas Vainius
  • Date: 2011-05-26 02:53:50 UTC
  • mfrom: (0.7.7 upstream) (0.4.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 296.
  • Revision ID: james.westby@ubuntu.com-20110526025350-7o10g65yegec2rnq
Tags: 4:4.6.3-1
* New upstream release.

[ José Manuel Santamaría Lema ]
* Bump kde-sc-dev-latest build dependency to 4:4.6.3.
* Bump Standards-Version to 3.9.2; no changes needed.

[ Modestas Vainius ]
* Enable DLRestrictions for libraries in this package. Requires
  libdlrestrictions-dev 0.14 and kdelibs5-dev 4:4.6.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[README.moreColors]
 
2
 
 
3
The konsole adopted some ESC codes allowing to use extended
 
4
color spaces.
 
5
 
 
6
There is a predefined 256 color space compatible with his
 
7
xterm sister, and, even beyond that, a 3-byte RGB color space.
 
8
 
 
9
The ESC codes are as follows:
 
10
 
 
11
   ESC[ ... 38;2;<r>;<g>;<b> ... m   Select RGB foreground color
 
12
   ESC[ ... 48;2;<r>;<g>;<b> ... m   Select RGB background color
 
13
 
 
14
   ESC[ ... 38;5;<i> ... m       Select indexed foreground color
 
15
   ESC[ ... 48;5;<i> ... m       Select indexed background color
 
16
 
 
17
<r>,<g> and <b> are each values in the range of 0..255 and
 
18
represent the brightness as usual for the respective color.
 
19
 
 
20
<i> likely is a value in 0..256, but represents an indexed
 
21
color assignment composed as follows:
 
22
 
 
23
  0 ..  15 - System color, these are taken from the schema.
 
24
 16 .. 231 - Forms a 6x6x6 RGB color cube.
 
25
232 .. 255 - A gray scale ramp without black and white.
 
26
 
 
27
Try the tests/color-spaces.pl to visualize the assignment.
 
28
 
 
29
 
 
30
----------------------------------------------------------------
 
31
 
 
32
A note on conformance
 
33
 
 
34
These ESC codes break the "associativity" of SGR, but after some
 
35
research the result is, that the standard itself is broken here.
 
36
 
 
37
The perhaps best codes due to ECMA-48 would probably be e.g.
 
38
38:2:<r>:<g>:<b>, i.e. consistently a colon instead of a semicolon.
 
39
But apparently, this is defined different in ISO-8613 (which is
 
40
included at this place in ECMA-48), actually breaking ECMA-48.
 
41
 
 
42
We cannot help this and implemented the codes as above, which
 
43
is a balanced decision.
 
44
 
 
45
For 256 color mode, this is compatible with xterm and perhaps
 
46
with other xterm compatible terminal emulations.
 
47
 
 
48
 
 
49
| ------- Additional Comments From awendt putergeek com  2006-06-07 07:40 -------
 
50
| > So a parameter substring is 0-9 and the colon. The semicolon separates
 
51
| > sub-parameters. Thus 48:5:<Color> would be one sub-parameter, and
 
52
| > 48;5;<Color> many independent, each having an independent meaning in case
 
53
| > of a selective parameter.
 
54
 
55
 
56
| I think you may be onto something here with the colons... I was able to find 
 
57
| ITU T.416 (which is the same as ISO 8613-6) and it says:
 
58
 
59
| --- snip ---
 
60
 
61
| The parameter values 38 and 48 are followed by a parameter substring used to 
 
62
| select either the character foreground ?colour value? or the character 
 
63
| background ?colour value?.
 
64
 
65
| A parameter substring for values 38 or 48 may be divided by one or more 
 
66
| separators (03/10) into parameter elements, denoted as Pe. The format of such 
 
67
| a parameter sub-string is indicated as:
 
68
 
69
|          Pe : P ...
 
70
 
71
| Each parameter element consists of zero, one or more bit combinations from 
 
72
| 03/00 to 03/09, representing the digits 0 to 9. An empty parameter element 
 
73
| represents a default value for this parameter element. Empty parameter 
 
74
| elements at the end of the parameter substring need not be included.
 
75
 
76
| The first parameter element indicates a choice between:
 
77
 
78
|            0   implementation defined (only applicable for the character 
 
79
| foreground colour)
 
80
|            1   transparent;
 
81
|            2   direct colour in RGB space;
 
82
|            3   direct colour in CMY space;
 
83
|            4   direct colour in CMYK space;
 
84
|            5   indexed colour.
 
85
 
86
| If the first parameter has the value 0 or 1, there are no additional parameter 
 
87
| elements.
 
88
 
89
| If the first parameter element has the value 5, then there is a second 
 
90
| parameter element specifying the index into the colour table given by the 
 
91
| attribute ?content colour table? applying to the object with which the 
 
92
| content is associated.
 
93
 
94
| --- snip ---
 
95
 
96
| The separator character 03/10 they use is a colon, not a semicolon... I wonder 
 
97
| if the xterm implementation was based on an improper reading of the standard?
 
98