downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ncurses_init_pair> <ncurses_inch
[edit] Last updated: Fri, 25 May 2012

view this page in

ncurses_init_color

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

ncurses_init_color端末の色を定義する

説明

int ncurses_init_color ( int $color , int $r , int $g , int $b )

指定した色を定義/再定義します。この関数がコールされると、 画面上に存在するその色の部分が即時に新しい定義に変わります。

色機能が端末でサポートされており、かつこの関数をコールする前に ncurses_start_color() で初期化されている必要があります。 さらに、端末が色の変更機能を持っている必要があります。これを調べるには ncurses_can_change_color() を使用します。

パラメータ

color

再定義したい色の番号。定義済みの色定数のいずれかとなるでしょう。

r

赤コンポーネントの値。 0 から 1000 までの値となります。

g

緑コンポーネントの値。 0 から 1000 までの値となります。

b

青コンポーネントの値。 0 から 1000 までの値となります。

返り値

関数が成功した場合は -1、 ncurses や端末の色機能の初期化ができていない場合、 端末に色の変更機能がない場合は 0 を返します。

参考



add a note add a note User Contributed Notes ncurses_init_color
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites