[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 107487] Please add the xterm-256 colour support.
From: dann () mothra ! ics ! uci ! edu
Date: 2006-02-21 18:42:21
Message-ID: 20060221184221.9173.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=107487
------- Additional Comments From dann godzilla ics uci edu 2006-02-21 19:42 -------
If someone want to work on this, what needs to be done is to add support
for the ESC;38;5;COLORNUMBERm ESC;$8;5;COLORNUMBERm escape sequences for setting the \
color background and foreground.
The colors 16 ... 256 can be computed with code like this:
for (r=g=b=0, i=16; i< 256; i++) {
if (i < 232) {
int j = i - 16;
int r = j / 36, g = (j / 6) % 6, b = j % 6;
int red = (r == 0) ? 0 : r * 40 + 55;
int green = (g == 0) ? 0 : g * 40 + 55;
int blue = (b == 0) ? 0 : b * 40 + 55;
color.red = red | red << 8 ;
color.green = green | green << 8;
color.blue = blue | blue << 8;
} else if (i < 256) {
int shade = 8 + (i - 232) * 10;
color.red = color.green = color.blue = shade | shade << 8;
}
The colors 0 ... 16 are in TEWidget.cpp:base_color_table 2...9 and 12...19
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic