Path: utzoo!mnetor!uunet!husc6!mailrus!umix!umich!mibte!twh From: twh@mibte.UUCP (Tim Hitchcock) Newsgroups: comp.terminals Subject: Re: Color CURSES? Message-ID: <2565@mibte.UUCP> Date: 6 Apr 88 14:33:51 GMT References: <4186@cup.portal.com> <7587@brl-smoke.ARPA> Organization: Michigan Bell Telephone Company Lines: 27 Summary: COLOR CURSES In article <7587@brl-smoke.ARPA>, gwyn@brl-smoke.UUCP writes: > In article <4186@cup.portal.com> Jeffrey_J_Vanepps@cup.portal.com writes: > >Does anyone have any pointers to a version of curses/termcap (or terminfo) > >that will support different colors and different video modes? What I'm > >looking for is something that will allow me to say "this word in green, > >this one in red, this one highlighted, this one blinking, etc." all on > >the same screen. > > Curses is dependent on terminal attributes described in the termcap > or terminfo data base, and as of 4.3BSD and SVR3.0, neither provides > a (standard) way to specify colors. Both provide for describing > modes such as reverse-video, bold, blink, underscore, dim, invisible, > and protected. See the appropriate manual entry. > > It sounds like you really need a forms interface, not curses. COLOR CURSES is supported in SVR3.2 terminfo. There will be a version for SVR3.1 too. ANSI has a standard for COLOR ANSI terminals. example of terminfo shell level use (COLOR/NUMBER definitions may not be exact): tput setf 1 # set foreground color to red tput setb 2 # set background color to blue tput setb 5 # set background color to yellow Note that COLORs are represented by numbers, not names.