팩토리 » Api
torgb
Description
파라미터를 기준으로 빨간색, 녹색, 파란색 색상값 배열을 넘겨주는 API이다.
Parameters
Parameters |
Type |
Description |
nColor |
COLOR |
xFrame 색상값 |
Return Value
Type |
Description |
Array |
빨간색, 녹색, 파란색 색상값 배열 |
Example
function btn_test_on_mouseup(objInst)
{
var clrRed = factory.rgb(255, 0, 0);
// 255 -> [255,0,0]
var rgb = factory.torgb(clrRed);
factory.consoleprint("red = " + rgb[0]);
factory.consoleprint("blue = " + rgb[1]);
factory.consoleprint("green = " + rgb[2]);
}
See Also
torgbhex
rgb
Viewer Ver.
9.1.1.1
Update Date
20241025