DModelPanel/GetColor

From Garry's Mod
Jump to: navigation, search
 DModelPanel:GetColor( )

Contents

DescriptionPanelFunc

Returns the color of the rendered entity.

Returns

table

The color of the entity, see Color structure.

Examples

Example

Prints out the default entity color.

local mdl = vgui.Create("DModelPanel")
mdl:SetPos(20, 20)
mdl:SetSize(200, 200)
mdl:SetModel("models/props_junk/watermelon01.mdl")

print(mdl:GetColor())

Output:

255 255 255 255
Personal tools
Navigation