[Konsole-devel] [Bug 107487] Please add the xterm-256 colour support.

dann at godzilla.ics.uci.edu dann at godzilla.ics.uci.edu
Wed May 31 17:25:37 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=107487         




------- Additional Comments From dann godzilla ics uci edu  2006-05-31 19:25 -------
Adding support for 256 colors in Konsole should be quite easy.
It should not be more than one hour of work to do this Konsole.

I implemented the 256 colors support in gnome-terminal and it took me about 30 minutes after looking at the code for the first time. 

(I do not use either gnome-terminal nor Konsole, but I have an interest in making 256 color terminals available)

If anybody wants to work on this, here are some steps you could follow: 
(obviously you could do things differently, this is just a suggestion)

First change TEWidget.cpp:base_color_table and the code that uses it so that 
colors 0 ... 16 are at indexes 0 .. 16 (this probably is the most time consuming part or the implementation).

Then extend base_color_table to contain 256 colors. The code for computing the RGB components for the colors is given in comment #4. 

Then implement the code that recognizes the ESC;38;5; and ESC;48;5 sequences and changes the fg/bg to the corresponding colors (probably 5-10 lines of code)

Good luck!



More information about the konsole-devel mailing list