Format::setRightColor (Previous) (Next) Format::setBgColor

View this page in Last updated: Sun, 05 Oct 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

Format::setFgColor

Format::setFgColor -- セルの前景色を設定する

説明

セルの"前景色"を設定します。

"前景色"という言い方には語弊があります。 ここでは、"前景"とは セルの背景の最上位レイヤのことを意味します。 セルに書き込む内容の色を設定するには、 setColor() メソッドを使用します。

実際に見える色は、使用している パターン および 背景色 に依存します。

" 背景色・前景色とパターンの関係" での例が非常に参考になります。

パラメータ

  • mixed $color - 文字列 ('blue' など) か、数値 (範囲は 8 から 63) のどちらかです。

    詳細な情報は、この下の "色の使用法" を参照ください。

色の使用法

名前で定義することができる色のリストは以下のとおりです。 blackwhiteredgreenblueyellowmagenta および cyan

インデックスで定義する色にどのようなものがあるのかを知りたければ、 Color Palette and the 56 Excel ColorIndex Colors を参照ください。 ここで挙げられている色インデックスは、 Spreadsheet_Excel_Writer で使用するものと 1 つずれていることに注意しましょう。

事前に定義済みの色が気に入らない場合は、 setCustomColor() メソッドを使用します。

注意

この関数は、スタティックにコールする ことはできません。

Format::setRightColor (Previous) (Next) Format::setBgColor

Download Documentation Last updated: Sun, 05 Oct 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: gwinkless
Further to my previous note, this behaviour is actually because of bug 12062 - http://pear.php.net/bugs/bug.php?id=12062 - in fact using colors 0-7 will actually map to colors 8-15, so with the default 0.9.1beta custom colors should only start at 16.
Note by: pear@defgeoff.co.uk
custom color is listed as starting at 8, but if you change index 8 it appears to affect the color "white". Index seems to work fine if you start at 9.