Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ncurses_pair_content(3) [php man page]

NCURSES_PAIR_CONTENT(3) 						 1						   NCURSES_PAIR_CONTENT(3)

ncurses_pair_content - Retrieves foreground and background colors of a color pair

SYNOPSIS
int ncurses_pair_content (int $pair, int &$f, int &$b) DESCRIPTION
Retrieves the foreground and background colors that constitute the given color pair. Terminal color capabilities must be initialized with ncurses_start_color(3) prior to calling this function. PARAMETERS
o $pair - The number of the color pair to retrieve information for. o $f - A reference to which to return the foreground color of the color pair. The information returned will be a color number referring to one of the pre-defined colors or a color defined previously by ncurses_init_color(3) if the terminal supports color changing. o $b - A reference to which to return the background color of the color pair. The information returned will be a color number referring to one of the pre-defined colors or a color defined previously by ncurses_init_color(3) if the terminal supports color changing. RETURN VALUES
Returns -1 if the function was successful, and 0 if ncurses or terminal color capabilities have not been initialized. SEE ALSO
ncurses_init_pair(3), ncurses_start_color(3). PHP Documentation Group NCURSES_PAIR_CONTENT(3)

Check Out this Related Man Page

NCURSES_INIT_COLOR(3)							 1						     NCURSES_INIT_COLOR(3)

ncurses_init_color - Define a terminal color

SYNOPSIS
int ncurses_init_color (int $color, int $r, int $g, int $b) DESCRIPTION
Defines or redefines the given color. When this function is called, all occurrences of the given color on the screen, if any, immediately change to the new definition. Color capabilities must be supported by the terminal and initialized using ncurses_start_color(3) prior to calling this function. In addi- tion, the terminal must have color changing capabilities; use ncurses_can_change_color(3) to check for this. PARAMETERS
o $color - The identification number of the color to redefine. It may be one of the default color constants. o $r - A color value, between 0 and 1000, for the red component. o $g - A color value, between 0 and 1000, for the green component. o $b - A color value, between 0 and 1000, for the blue component. RETURN VALUES
Returns -1 if the function was successful, and 0 if ncurses or terminal color capabilities have not been initialized or the terminal does not have color changing capabilities. SEE ALSO
ncurses_color_content(3), ncurses_start_color(3). PHP Documentation Group NCURSES_INIT_COLOR(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Reverse Display

I need to display a line in an xterm window but i want to revese the colors so that the background color becomes the foreground color and the foreground color the background color. I want to do this as part of ksh script. Can somebody tell me how to do this ? Thanks, Abu. (5 Replies)
Discussion started by: marcose
5 Replies

2. UNIX for Dummies Questions & Answers

set background/foreground color in .profile

I am using a telnet session (VT100) and need to modify my .profile so that it will set the color of the telnet session. I am not using Xterm (ie: can't use .Xdefaults). I am able to change the colors via menu's but need to preset in .profile. Is this possible??? Can't find anything at all on how... (3 Replies)
Discussion started by: dvella
3 Replies

3. UNIX for Dummies Questions & Answers

Print in color

I have a short code below: awk 'NR==1 {printf "'$information'-MYDATA-'$information' \n"} {print $0}' data.file > newdata.file I want the "information" color in RED and MYDATA in BLUE. How can I do it? Please help!!!! (3 Replies)
Discussion started by: bobo
3 Replies

4. Shell Programming and Scripting

Color putty

Right now I am using putty. I am using 2-3 terminals at a time. To differentiate each termianl I want to put each putty screen and background color to different colors. I tried changing the colors in normal putty but it's not working. Is there any other color putty ? Regards, Venkat (2 Replies)
Discussion started by: svenkatareddy
2 Replies

5. UNIX for Advanced & Expert Users

Terminal colors

Hi, is there a way to change the colors used in ls --color=always? I tried to define LSCOLOR and CLICOLOR but it doesn't work! Bye... (2 Replies)
Discussion started by: TShirt
2 Replies

6. Filesystems, Disks and Memory

what is an "FA pair" in san storage?

can anyone tell me what an FA pair is, in SAN storage? thank you. (2 Replies)
Discussion started by: bumblebee
2 Replies

7. Shell Programming and Scripting

how to set background color in Unix terminal

Hi All, how do I set in .profile file Unix terminal background color = BLUE ? Please advice me. :confused: (2 Replies)
Discussion started by: raghur77
2 Replies

8. AIX

Enabling color for putty session

Hi Everyone: Is there any way to enable colors through putty for a session into AIX? I've tried to set the TERM variable to xterm-256color but it doesn't work having a 8-color terminal would be okay for me thanks in advance (5 Replies)
Discussion started by: edgarvm
5 Replies

9. SuSE

Vi in color

How do you turn off color in vi? (2 Replies)
Discussion started by: jgt
2 Replies

10. Shell Programming and Scripting

Change color on another terminal

i already have a running and working script for remote connection. is there a way to change the terminal color everytime I ssh remotely to another server? this is to avoid confusion since I will be using only one server to remotely access around 50 servers (solaris, linux,. etc) (2 Replies)
Discussion started by: lhareigh890
2 Replies

11. UNIX for Dummies Questions & Answers

Sending command from one terminal to another.

Hello, I am running a program in a terminal. this program is just printing random words. I can change the color of each word by entering the first character of the color(for example G for Green). I want to write a bash code that runs in a different terminal and sends different characters to... (3 Replies)
Discussion started by: alireza6485
3 Replies

12. UNIX for Dummies Questions & Answers

How to change the background color in the init 3 mode(not line color)

Hello, I am using RHEL 6.1 on VMware I am searching for a way to change background color (not line by line color wich one can using tput command) basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies

13. Solaris

Reasonable useful life for e2900

What would you think is a reasonable useful lifespan for a Sunfire e2900. I'm not referring to it's performance capabilities as much as I'm referring to the hardware's ability to perform reliably. (2 Replies)
Discussion started by: DustinT
2 Replies

14. Shell Programming and Scripting

How many studies have unequal values for each pair?

I have several Studies (s) which has points (p) having Values (v). My goal is to determine for each pair of points, how many studies have different values ( if available ). Study Point Value 1 p1 value1 1 p2 value2 1 p3 value1 1 p4 value3 1 p5 value3 2 p2 value1 2 p4 value1 3 p1 value1... (5 Replies)
Discussion started by: senhia83
5 Replies

15. UNIX for Beginners Questions & Answers

Text color in Linux scripts via putty

hi Folks, Can anyone help with changing the color of the words in a linux shell script? I get how to change default background etc in putty, but for some reason the text in the script has different colors for different parts of the cript. Is there a way to have one color in a linux shell... (5 Replies)
Discussion started by: jonnyd
5 Replies