![]() |
| サイトマップ | |
|
トランスフォーム関数 rgbcolor
は、0 から 255 までの引数 r, g, b を使って、対応する色をワークシートのセルに返します。この関数を使ってカスタムカラーをワークシート列に生成することで、グラフやプロットの任意の要素にこのカスタムカラーを適用することができます。
rgbcolor
(r, g, b)
引数 r, g, b は、使用する色の赤、緑、青の輝度成分をそれぞれ定義します。引数は 0~255 の間のスカラーで指定する必要があります。引数の数値が 0 未満または 255 より大きい場合は、0 もしくは 255 に切り捨てられます。
rgbcolor(255,0,0)
は、赤を返します。rgbcolor(0,255,0)
は、緑を返します。rgbcolor(0,0,255)
は、青を返します。
cell(1,1)=rgbcolor(255,255,0) cell(1,2)=rgbcolor(255,0,255) cell(1,3)=rgbcolor(0,255,255)
cell(1,1)=rgbcolor(0,0,0) cell(1,2)=rgbcolor(127,127,127) cell(1,3)=rgbcolor(255,255,255)
The transform function rgbcolor takes arguments r, g, and b between 0 and 255 and returns the corresponding color to cells in the worksheet. This function can be used to apply custom colors to any element of a graph or plot that can use colors chosen from a worksheet column.
rgbcolor(r,g,b)
The r,g,b arguments define the red, green, and blue intensity portions of the color. These values must be scalars between 0 and 255. Numbers for the arguments less than 0 or greater than 255 are truncated to these values.
The operation rgbcolor(255,0,0) returns red.
The operation rgbcolor(0,255,0) returns green.
The operation rgbcolor(0,0,255) returns blue.
cell(1,1)=rgbcolor(255,255,0) cell(1,2)=rgbcolor(255,0,255) cell(1,3)=rgbcolor(0,255,255)
cell(1,1)=rgbcolor(0,0,0) cell(1,2)=rgbcolor(127,127,127) cell(1,3)=rgbcolor(255,255,255)