ncurses_color_content Retrieves RGB components of a color php函数


ncurses_color_content

(PHP 4 >= 4.3.0, PHP 5 < 5.3.0, PECL ncurses >= 1.0.0)

ncurses_color_contentRetrieves RGB components of a color

说明

int ncurses_color_content ( int $color , int &$r , int &$g , int &$b )

Retrieves the red, green, and blue components for the given color definition. Terminal color capabilities must be initialized with ncurses_start_color() prior to calling this function.

参数

color

The number of the color to retrieve information for. May be one of the pre-defined color constants.

r

A reference to which to return the red component of the color. The value returned to the reference will be between 0 and 1000.

g

A reference to which to return the green component of the color. The value returned to the reference will be between 0 and 1000.

b

A reference to which to return the blue component of the color. The value returned to the reference will be between 0 and 1000.

返回值

Returns -1 if the function was successful, and 0 if ncurses or terminal color capabilities have not been initialized.

参见



相关阅读:
ncurses_color_set Set active foreground and background colors
ncurses_curs_set Set cursor state
ncurses_define_key Define a keycode
ncurses_def_prog_mode Saves terminals (program) mode
ncurses_def_shell_mode Saves terminals (shell) mode
ncurses_delay_output Delay output on terminal using padding characters
ncurses_delch Delete character at current position, move rest of line left
ncurses_deleteln Delete line at current position, move rest of screen up
ncurses_delwin Delete a ncurses window
ncurses_del_panel Remove panel from the stack and delete it (but not the associated window)
ncurses_doupdate Write all prepared refreshes to terminal
ncurses_echo Activate keyboard input echo
ncurses_echochar Single character output including refresh
ncurses_end Stop using ncurses, clean up the screen
快速导航

Copyright © 2016 phpStudy |