Here's the script that I use to see how things look and remind me of the codes. Don't forget to put in the escapes where appropriate. Or use the script in the attached file.
======cut====== #!/bin/sh gawk ' BEGIN { print "[7m 0 black 1 red 2 green 3 yellow 4 blue 5 magenta 6 cyan 7 white [0m" for (F = 30; F < 38; F++) { for (I = 0; I < 2; I++) { for (B = 40; B < 48; B++) { printf "[%i;%i;%im%i;%i;%i[5m;5[0;37;40m ", I, F, B, I, F, B } printf "\n" } } exit 0 }' | \ sed -e 's/ $//' echo '[7m 7 = reverse video = 30;47 [0m [5;8;44m 8 = conceal = 30 [0m' echo 'ln;colH = set cursor position, #A = up, #B = down, #C = right, #D = left, s = save cursor position, u = restore cursor position 2J = clear screen, K = clear to end of line, 7l = no line wrapping' ======cut====== Enjoy! -----Original Message----- From: Alejandro López-Valencia Sent: Wednesday, April 28, 2004 5:55 PM To: [EMAIL PROTECTED] Subject: Re: How to set the colors of terminfo's standout mode? At 07:56 a.m. 28/04/2004, Frank Slootweg wrote: > Is there a place where all these (I assume ANSI) escape sequences for >colors are listed? When I have that information, I can probably untic an >existing terminfo entry, modify it and tic it back to another name and >use that. The one I use came with the documentation of an ftp/sftp client I use, yafc. Tis information is very hard to come by if one is in a bind, so I'll include it here. Yafc's info file says: ---begin quote Colors ====== Escape codes can be used to display colors in the transfer strings and the prompts. All escape codes must be surrounded by %{ and %} pairs for readline to correctly wrap long lines. The built-in command `ls' has an option `--color'. You must set the environment variable LS_COLORS (or LS_COLOURS) for this to work. See manpage for GNU ls(1) and *note dircolors: (fileutils)dircolors invocation, for information how to do this. If you don't set LS_COLO[U]RS, you can still use the `--color' option, since Yafc provides some default settings. ANSI attribute codes -------------------- An ANSI escape sequence has the format `ESC[X;Ym', where `ESC' is the escape character (octal 033). `X' and, optionally, `Y', is one of the following escape codes: * attribute codes - 00 = none - 01 = bold - 04 = underscore - 05 = blink - 07 = reverse - 08 = concealed * text color codes - 30 = black - 31 = red - 32 = green - 33 = yellow - 34 = blue - 35 = magenta - 36 = cyan - 37 = white * background color codes - 40 = black - 41 = red - 42 = green - 43 = yellow - 44 = blue - 45 = magenta - 46 = cyan - 47 = white For example, the sequence `ESC[1;32myafc rulesESC[0m' will be the string `yafc rules' in bright green, after which the attribute is restored to normal. ---end quote -- Alejandro López-Valencia http://dradul.tripod.com/ The limits of my language are the limits of my world. (L. Wittgenstein)
ansi.bz2
Description: Binary data
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/