# Text With Color
Grammar — Text text with color color
Flags —Native
|Function
Encloses the text with a color formatting tag so it will use the given color.
# Arguments
text
— Textcolor
— Color
Returns — text
native text TextWithColor(text t, color c);
# Related
Category: String / Formatting
- [F] —
text
— Convert Time To Text — ( TextTimeFormat ) - [F] —
string
— Convert String Case — ( StringCase ) - [F] —
text
— Convert Text Case — ( TextCase ) - [F] —
text
— Convert Game Text — ( StringExternal ) - [F] —
text
— Convert Game Hotkey — ( StringExternalHotkey ) - [F] —
text
— Convert Game Asset — ( StringExternalAsset ) - [F] —
text
— Text With Color — ( TextWithColor ) - [F] —
void
— Set Text Expression Token — ( TextExpressionSetToken ) - [F] —
text
— Text Expression — ( TextExpressionAssemble )
# Examples
# mods/liberty.sc2mod
// L335
TextWithColor(PlayerName(lp_player), libNtve_gf_ConvertPlayerColorToColor(PlayerGetColorIndex(lp_player, false)))
# mods/starcoop/starcoop.sc2mod
// 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
// L1069
TextWithColor(lv_prop, lv_color)