Difference between revisions of "Category:LSL Color/ko"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{Multi-lang}}{{LSL Header/ko}} {{#if: {{#vardefine:header_title|LSL 색상}} {{#vardefine:header_text| LSL은 자체 색상형식을 갖추고 있다. LSL은 색상을 저장하기 위...)
 
(unnecessary category?)
 
Line 45: Line 45:


}}{{LSL Generic/ko}}{{LSLC/ko|Face|Color}}
}}{{LSL Generic/ko}}{{LSLC/ko|Face|Color}}
{{LSLC/ko|}}{{LSLC|FixMe}}
{{LSLC/ko|}}

Latest revision as of 16:43, 28 October 2023

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.