I believe that some of the example ANSI escape sequences encoded in gnu-apl.d/preferences are partially incorrect.
In particular, any sequence containing ESC [ ... 38 ... m or ESC [ ... 48 ... m is not valid as written in gnu-apl.d/preferences . Referring to http://invisible-island.net/xterm/ctlseqs/ctlseqs.html, we see that the 38 and 48 are prefixes for foreground and background RGB colors (as used correctly in src/Output.cc). It seems that xterm manages to keep going despite the incorrect sequence. I suggest replacing the 38 and 48 sequences (hex 33 38 and 34 38) with 39 and 49 (hex 33 39 and 43 49). These choose the terminal's default foreground and background colors. Also, the RESET-SEQUENCE can be written universally as 1b 5b 30 3b 33 39 3b 34 39 6d (ESC [ 0 ; 39 ; 49 m) -- this clears attributes and resets the foreground and background colors to the terminal defaults. -- "The secret to creativity is knowing how to hide your sources." Albert Einstein http://soundcloud.com/davidlamkins http://reverbnation.com/lamkins http://reverbnation.com/lcw http://lamkins-guitar.com/ http://lamkins.net/ http://successful-lisp.com/