VS:RGBToColorIndex/ja

From Vectorworks Developer
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

各色の成分に一番近いカラーパレットの色番号を返します。値の範囲は0から65535までです。

PROCEDURE RGBToColorIndex(
red :LONGINT;
green :LONGINT;
blue :LONGINT;
VAR color :INTEGER);
def vs.RGBToColorIndex(red, green, blue):
    return color

Parameters

red LONGINT 赤の成分
green LONGINT 緑の成分
blue LONGINT 青の成分
color INTEGER 色番号

Example

PROCEDURE Example;
VAR
	red, green, blue :LONGINT;
	colorIndex :INTEGER;
BEGIN
	GetPenFore(FSActLayer, red, green, blue);
	RGBToColorIndex(red, green, blue, colorIndex);
	Message(colorIndex);
END;
RUN(Example);

Version

利用可能バージョン: MiniCAD6.0