The mythical tinyfugue 256 color patch

To use, apply the patch and /load 256colors.def. Also, 256 color tinyfugue depends on a 256 color terminal. xterm, on UNIX, is the only known terminal that supports 256 colors. So, unless someone can find a windows terminal supporting the escape codes, this patch will not work on windows.

This patch also fixes the overlapping color bug-- it is now possible to get reasonable results when two macro's try to color text different colors. If I remember the implementation right, later (lower priority) color matches take precedence over earlier (higher priority) matches.

The patch is a bit gross, but its what I've been using for about 5 years. It also cleans up a few spots wherre Key Keyes uses short instead of attrib_t . Note that this patch only works if the terminal supports xterm-style 256 color codes. You may need a custom compile of xterm. Please see the xterm homepage to get the source, read the build instructions, and compile. Please do not bother the author of xterm.

To test xterm support and for a visual demonstration of the colors, 256colors2.pl is included here from the xterm distribution. A demo of its output is shown in the screenshots below.

Code is available here for tf4.0s1 only. There is no ETA or promise of a tf5.0 patch.... at least until tf 5.0 becomes my preferred version of tinyfugue.

Demonstration of output

Using the patch: The new colors have names as given in 256colors.def Roughly, rgb_RGB and bgRGB_RGB where R, G, B are the rgb values 0,1,2,3,4,5. There is also grayNN and bggrayNN with NN in 0...23.

Screenshots

This is the test file in the xterm distribution. If your results look the same as this on the xterm test, then you're ready to try the tf patch.

Here is a a picture of it in use demoing my normal macro coloring set. I have macros that hilight text in (), <&rt;, '', [], "" and others. I also have macro's that make macro's that hilight friends in one of 4 different colors, about 200 generated macros in all.


Changes: Point out that this depends on a 256 color terminal, and that xterm is the only known one.
Last modified: Mon Jan 19 17:57:05 CST 2004