DImage/GetImageColor

From Garry's Mod
Jump to: navigation, search
 DImage:GetImageColor( )

Contents

DescriptionPanelFunc

Returns the color override of the image panel.

Returns

table

The color override of the image. Uses the Color structure.

Examples

Example

Creates an image panel and prints the default color override to console.

-- Generic image panel
local img = vgui.Create("DImage")
img:SetSize(128, 128)
img:Center()
img:SetImage("cantop")

print(img:GetImageColor())

Output:

255 255 255 255
Personal tools
Navigation