Color

Color κ°μ²΄μ—μš”.

속성

R

λΉ¨κ°„ 색을 λ‚˜νƒ€λ‚΄μš”. (0 ~ 255)

G

초둝 색을 λ‚˜νƒ€λ‚΄μš”. (0 ~ 255)

B

νŒŒλž€ 색을 λ‚˜νƒ€λ‚΄μš”. (0 ~ 255)

A

투λͺ…도λ₯Ό λ‚˜νƒ€λ‚΄μš”. (0 ~ 255)

-- μƒ˜ν”Œ --

local color1 = Color.new(255, 0, 0, 255)
local color2 = Color.new() --μ „λΆ€ 0둜 ν• λ‹ΉλΌμš”.
local ui = Workspace.ScreenUI.Text

ui:SetTextColor(color1) --ν…μŠ€νŠΈ UI의 κΈ€μž 색상을 λ³€κ²½ν•΄μš”.

wait(1)
local newColor = Color.new(0, 255, 255, 0)
color1 = color1 + newColor --newColor.R = 255, newColor.G = 255, newColor.B = 255, newColor.A = 255둜 ν• λ‹ΉλΌμš”.

μƒμ„±μž

Color new()

Colorλ₯Ό μƒμ„±ν•΄μš”

Color new(number R, number G, number B, number A)

Colorλ₯Ό R, G, B, A κ°’μœΌλ‘œ μ„ΈνŒ…ν•˜μ—¬ μƒμ„±ν•΄μš”

-- μƒ˜ν”Œ --

local white = Color.new(255, 255, 255, 255)

ν•¨μˆ˜

Last updated