Garry's Mod Wiki

DLabel:SetTextColor

  DLabel:SetTextColor( table color )

Description

Sets the text color of the DLabel. This will take precedence over DLabel:SetTextStyleColor.

Arguments

1 table color
The text color. Uses the Color.

Example

Changes the text color to red.

local frame = vgui.Create( "DFrame" ) frame:SetTitle( "Text Color Example" ) frame:SetSize( 300, 100 ) frame:Center() frame:MakePopup() local frame_label = vgui.Create( "DLabel", frame ) frame_label:SetPos( 10, 30 ) frame_label:SetTextColor( Color( 255, 0, 0) )