Dave Mielke <d...@mielke.cc> writes: > [quoted lines by Aura Kelloniemi on 2015/11/13 at 11:26 +0200] >>BRLTTY nowadays displays colour names incorrectly with the Describe Character >>command.
> Could you please test this with the latest code to see if it's been resolved? It seems to work now. I wrote a small python script to test for it. The script is attached to this message, so that everybody else can try it out. This script writes a line of text with all possible combinations of foreground and background colours. It uses the ECMA-48 escape codes for changing colours. It also uses the ECMA-48 bold and blink display attributes to try to change the colours' intensity. To use this sciprt, run it and pipe the result to a pager. If you use less, use the -r option to allow less to print the escape sequences as raw strings. I could not get the blink attribute working on Linux console. Traditionally it changed the background colour to be bright, as the bold attribute does for the foreground colour. > Also, your "double cursor" problem should be resolved now. It's gone, thanks! -- Aura
#!/usr/bin/python # This file is Copyright (C) 2015 by Aura Kelloniemi # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You can find the text of the GNU General Public License on-line. Visit # <http://www.gnu.org/licenses/>. # This script writes a line of text with all possible combinations of foreground # and background colours. It uses the ECMA-48 escape codes for changing colours. # It also uses the ECMA-48 bold and blink display attributes to try to change # the colours' intensity. # To use this sciprt, run it and pipe the result to a pager. If you use less, # use the -r option to allow less to print the escape sequences as raw strings. # I could not get the blink attribute working on Linux console. Traditionally it # changed the background colour to be bright, as the bold attribute does for the # foreground colour. import sys fg_colours = [ ('black', '30'), ('red', '31'), ('green', '32'), ('brown', '33'), ('blue', '34'), ('magenta', '35'), ('cyan', '36'), ('light grey', '37'), ('dark grey', '1;30'), ('light red', '1;31'), ('light green', '1;32'), ('yellow', '1;33'), ('light blue', '1;34'), ('light magenta', '1;35'), ('light cyan', '1;36'), ('white', '1;37') ] bg_colours = [ ('black', '40'), ('red', '41'), ('green', '42'), ('brown', '43'), ('blue', '44'), ('magenta', '45'), ('cyan', '46'), ('light grey', '47'), ('dark grey', '5;40'), ('light red', '5;41'), ('light green', '5;42'), ('yellow', '5;43'), ('light blue', '5;44'), ('light magenta', '5;45'), ('light cyan', '5;46'), ('white', '5;47') ] attr_reset = '0' def write_esc_sequence (data): sys.stdout.write ("\033[" + data + 'm') for bgn, bgc in bg_colours: for fgn, fgc in fg_colours: write_esc_sequence (attr_reset + ';' + fgc + ';' + bgc) sys.stdout.write (fgn + ' text on ' + bgn + " background\n") write_esc_sequence (attr_reset)
_______________________________________________ This message was sent via the BRLTTY mailing list. To post a message, send an e-mail to: BRLTTY@mielke.cc For general information, go to: http://mielke.cc/mailman/listinfo/brltty