X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,85f1d9f14595206e X-Google-Attributes: gidf996b,public X-Google-ArrivalTime: 2001-06-15 12:29:20 PST From: Neil Franklin Newsgroups: alt.ascii-art Subject: Re: make things colorful Date: 15 Jun 2001 21:28:37 +0200 Organization: My own Private Self Lines: 45 Message-ID: <6uzob98rve.fsf@chonsp.franklin.ch> References: <3B2A04E3.5ADE8EF9@web.de> X-Complaints-To: news@chonsp.franklin.ch NNTP-Posting-Date: 15 Jun 2001 19:28:37 GMT X-Newsreader: Gnus v5.7/Emacs 20.4 NNTP-Posting-Host: ascension.ethz.ch X-Trace: 15 Jun 2001 21:29:13 +0200, ascension.ethz.ch Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!t-online.de!news-ge.switch.ch!news-zh.switch.ch!pfaff.ethz.ch!chonsp.franklin.ch!not-for-mail Xref: archiver1.google.com alt.ascii-art:6190 "lastfuture (Peter Marquardt)" writes: > >Hello, > >i use this in my .profile > > > >echo -e "\033[31m text red" # [3x for text color > >echo -e "\033[41m text with red background" # [4x for background > >color 30 black, 31 red, 32 green, 33 yellow, 34 blue, 35 magenta, 36 cyan, 37 white for forground, 40-47 for background can be combined: \033[33;44m yellow on blue > >echo -e "\033[0m text standard # white without any effects Ehm. Only white (with black text) if that is your terminals preferences. This terminal it resets to green text on black. > >you can use from [1m - [49m for any effects, bold, blink, reverse ... Actually only a few of the one digit ones and then 30-37 and 40-47. All others are meaningless. 1 bold, 4 underlined, 5 blink, 7 reverse fore/back color Or course you may be surprised with the result. My terminal does bold->yellow (really bright green) and underline->yellowgreen (half overbright). Such is the world of terminals. Also combinable \033[1;31m bold and red. > mmh won't that always only color one single line? ... No. These codes set the attributes (color and style) for all following characters, until new setting or reset with \033[0m -- Neil Franklin, neil@franklin.ch.remove http://neil.franklin.ch/ Hacker, Unix Guru, El Eng HTL/BSc, Sysadmin, Archer, Roleplayer - Intellectual Property is Intellectual Robbery