Revision Difference
DImageButton:SetColor#554184
<function name="SetColor" parent="DImageButton" type="panelfunc">
<ispanel>yes</ispanel>⤶
<description>Sets the color of the image. Equivalent of <page>DImage:SetImageColor</page></description>
<realm>Client and Menu</realm>
<args>
<arg name="color" type="table">The <page>Global.Color</page> to set</arg>
</args>
</function>
<example>
<description>Changes the image to blue:</description>
<code>
-- E.g. for the Engineer (blue)
local engineerClass = vgui.Create("DImageButton", container)
engineerClass:SetColor(Color(22, 166, 236, 255))
-- ...
</code>
<output>
<image src="MBD_Lobby_DImageButtonWithoutSetColor.png" alt="thumb|left|Without_SetColor(...)"/>
<image src="MBD_Lobby_DImageButtonWithSetColor.png" alt="thumb|left|With_SetColor(...)"/>
</output>
</example>