# Text With Color

Grammar — Text text with color color
FlagsNative | Function

Encloses the text with a color formatting tag so it will use the given color.

# Arguments

  • text — Text
  • color — Color

Returns — text

native text TextWithColor(text t, color c);

Category: String / Formatting

# Examples

# mods/liberty.sc2mod

LibertyLib.galaxy

// L335
TextWithColor(PlayerName(lp_player), libNtve_gf_ConvertPlayerColorToColor(PlayerGetColorIndex(lp_player, false)))

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L9415
TextWithColor(TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))))), Color(100.00, 0.00, 0.00))
// L9419
TextWithColor(TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(DataTableGetTimer(true, libCOMI_gf_CM_ObjectiveTimer(lp_objective))))), Color(100.00, 100.00, 0.00))

# mods/warcoop/warclassic.sc2mod

WarClassic.galaxy

// L1069
TextWithColor(lv_prop, lv_color)