How do you access to _radiant.csg Libraries?

I was working on semi-transparent building, and I found the voxel_brush_util.lua and Color3, Color4. The Color4 is RGBA and Color3 is RGB. I need to access to Color4 Library, but apparently I don’t know how.

Does anyone know how to access to the libraries?
(I looked at the radiant mod, but coudn’t find it.)

I’ll share the script of voxel_brush_util.lua just in case.

local voxel_brush_util = {}
local Point3 = _radiant.csg.Point3
local Color3 = _radiant.csg.Color3

local MODEL_OFFSET = Point3(0, 0, 0)

function voxel_brush_util.create_brush(brush, origin, normal)
checks(‘string’, ‘?Point3’, ‘?Point3’)

if Color3.is_color(string.upper(brush)) then
return _radiant.voxel.create_color_brush(string.upper(brush))
end

local brush = _radiant.voxel.create_qubicle_brush(brush)
if origin then
brush:set_origin(origin)
end
if normal then
brush:set_normal(normal)
end
brush:set_clip_whitespace(true)

return brush
end

return voxel_brush_util

Color4 is a C++ class that is exposed to lua through luabind. It has a constructor that takes r, g, b, a and r, g, b, a properties that you can get or set. For example:

local Color4 = _radiant.csg.Color4
local my_color = Color4(255, 0, 0, 255)
my_color.b = 255

Ok, I got that (Although I didn’t knew if it was actually a C++ class or not…), but how do you access stuff like Color.IsColor() and know what that is?

How can you check the reference of C++ classes?

All of that is defined in C++ luabind syntax. It’ll eventually be documented when we have API documentation for modders, but for now, you just have to ask.

I just looked and is_color is only defined for Color3 and not for Color4. This is obviously still a work in progress…

Oh, ok. Thanks for the replies. I’ll find a way…