How to "target" RGB values in Color()

So say I wanted to just get the R value in a Color table and store it in a variable, but not the G, and B values. Does anyone know of a way to do this? Thanks.

[lua]local r = color.r[/lua]



local col = Color
local R = 0
function Color(r,g,b,a)
R = r
return col(r,g,b,a)
end
Color(100,0,0)


I’m sorry but I’m still rather new to Lua, could you explain this a little bit or elaborate?

The first reply is probably what you’re looking for, the second is detouring the Color function so every time it gets called it sets the R variable.