Category:LSL Color/ko

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

LSL 색상

LSL은 자체 색상형식을 갖추고 있다. LSL은 색상을 저장하기 위해 벡터를 사용한다. 각 채널이 0 -> 255의 값을 갖는 일반적인 RGB과 달리, LSL 색상 채널은 0 -> 1의 값을 갖는다.

형식: <R, G, B>

• float x 빨강 [0, 1]
• float y 초록 [0, 1]
• float z 파랑 [0, 1]

예제

<lsl>vector white = <1.0, 1.0, 1.0>; vector grey = <0.5, 0.5, 0.5>; vector black = <0.0, 0.0, 0.0>; vector red = <1.0, 0.0, 0.0>; vector green = <0.0, 1.0, 0.0>; vector blue = <0.0, 0.0, 1.0>; vector yellow = <1.0, 1.0, 0.0>; vector cyan = <0.0, 1.0, 1.0>; vector magenta = <1.0, 0.0, 1.0>;</lsl>

유용한 조각

색상과 투명도를 정수로/에서 저장/반환하는 함수

<lsl>integer ColorAlphatoRGBA(vector color, float alpha) { return (((integer)(alpha * 255.0) & 0xFF) << 24)

Pages in category "LSL Color/ko"

This category contains only the following page.