Skip to Content
Game ReferencesText Formatting
Report an error
Open in ChatGPTOpen in Claude

Text Formatting

GTA V uses special formatting codes in text strings for colours, input prompts, and text styling. These work in notifications, help text, and other UI elements. Reset styles after highlighted text, prefer input tokens over literal keys, and test the final string in every UI surface where it appears.

Quick Usage

-- Coloured notification BeginTextCommandThefeedPost("STRING") AddTextComponentSubstringPlayerName("~r~ALERT: ~s~Something happened!") EndTextCommandThefeedPostTicker(false, false) -- Show input prompt in help text BeginTextCommandDisplayHelp("STRING") AddTextComponentSubstringPlayerName("Press ~INPUT_CONTEXT~ to interact") EndTextCommandDisplayHelp(0, false, true, -1)
// JavaScript equivalent BeginTextCommandThefeedPost("STRING"); AddTextComponentSubstringPlayerName("~r~ALERT: ~s~Something happened!"); EndTextCommandThefeedPostTicker(false, false);

All Formatting Codes

Official source · Snapshot: · Download complete JSON

81 of 81 entries

Color codes
SpecialLabelDescriptionExample
~HUD_COLOUR_...~References an existing HUD color .HUD colorFind the ~HUD_COLOUR_FREEMODE~freemode ped!
~HC_...~An alias for ~HUD_COLOURFind the ~HC_FREEMODE~freemode ped!
~HC_[number]~Specifies a HUD color by index.Get to ~HC_13~Davis.
~s~Resets the color to the default for the current context.After killing the ~r~enemies~s~, you win!
~v~HUD_COLOUR_SCRIPT_VARIABLE This is a placeholder for the color set with SET_SCRIPT_VARIABLE_HUD_COLOUR .HUD_COLOUR_SCRIPT_VARIABLESET_SCRIPT_VARIABLE_HUD_COLOURWait for your ~v~team~s~ to lose the Cops.
~u~HUD_COLOUR_SCRIPT_VARIABLE_2 This is a placeholder for the color set with _SET_SCRIPT_VARIABLE_2_HUD_COLOUR .HUD_COLOUR_SCRIPT_VARIABLE_2_SET_SCRIPT_VARIABLE_2_HUD_COLOURTake out ~v~~a~~s~ & defend ~u~~a~~s~.
~w~HUD_COLOUR_WHITE Used together with ~s~ to reset text color.HUD_COLOUR_WHITESwoop on over to ~b~foreclosures.maze-bank.com~w~~s~ today
ColorLabelDescriptionExample
~r~HUD_COLOUR_RED Used for enemy characters or vehicles.HUD_COLOUR_REDKill all the ~r~Vagos.
~g~HUD_COLOUR_GREEN Used for pickup-type objectives.HUD_COLOUR_GREENPick up the ~g~flash drive.
~b~HUD_COLOUR_BLUE Used for friendly characters or vehicles.HUD_COLOUR_BLUEDefend ~b~Lamar.
~f~HUD_COLOUR_FRIENDLY An alternate (rare) version for friendly objectives.HUD_COLOUR_FRIENDLYVehicle health can be restored by waiting in the ~f~pit stop area~s~.
~y~HUD_COLOUR_YELLOW Destination names.HUD_COLOUR_YELLOWDeliver the Special Cargo to the ~y~restricted area.
~c~HUD_COLOUR_MENU_GREY De-emphasized text used in subtitles, to indicate a character out of view.HUD_COLOUR_MENU_GREY~z~He's a bum! ~c~~n~Oh my God!
~t~HUD_COLOUR_MENU_GREY De-emphasized text used in subtitles, to indicate text spoken in a different language.HUD_COLOUR_MENU_GREY~z~those ~t~idiots.
~o~HUD_COLOUR_ORANGE A team color indicator.HUD_COLOUR_ORANGE~o~The Cocks~s~ are mad.
~p~HUD_COLOUR_PURPLE A team color indicator.HUD_COLOUR_PURPLE~p~The Boars~s~ are off the radar.
~q~HUD_COLOUR_PINK Used for Arena War.HUD_COLOUR_PINKYou are the active contender on your ~q~team~s~.
~m~HUD_COLOUR_MID_GREY_MP Medium gray to de-emphasize or use for 'Silver'.HUD_COLOUR_MID_GREY_MP~m~Display Mini Map.
~l~HUD_COLOUR_BLACK Used when unable to set a color any other way to specify black.HUD_COLOUR_BLACK~l~PLAYERS
~d~HUD_COLOUR_BLUEDARK Used to specify a team objective occupied by a player.HUD_COLOUR_BLUEDARKHelp your team deliver a ~d~vehicle ~s~to your ~b~base.
Visual formatting codes
LabelDescriptionExample
~n~A line break, similar to <br> in HTML.This text is~n~on two lines.
~h~Bold text. Use a second time to unbold.This is ~h~quite bold~h~ of you.
~bold~An alias of ~h~ .This is also pretty ~bold~bold~h~.
~italic~Italic text. Use a second time to remove italics.Text can be ~italic~written~italic~ in italics.
~ws~A wanted star.The ~ws~~ws~ on the top right indicates
~wanted_star~A wanted star, equal to ~ws~ .~wanted_star~~wanted_star~~wanted_star~
<C>...</C>Condensed. Usually used for gamer tags.<C>~a~</C> is dominating you.
~nrt~No Return Top. This would mean the padding or margin being added does not include any additional space related to the "return" or "top" of the previous element. Works similar to the ~n~~nrt~ Added padding before (above) this text
~EX_R*~A Rockstar logo, in fonts that support this character.The ~EX_R*~ logo is a registered trademark
~BLIP_...~In help messages and other supported contexts, shows the blip with the specified name.blipBenny's Original Motor Works is now available at ~HUD_COLOUR_YELLOW~~BLIP_BENNYS~~s~.
Content formatting codes
LabelDescriptionExample
~a~A placeholder for a substring 'text component', such as ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL.Fight the ~a~.
~1~A placeholder for a numeric 'text component', such as ADD_TEXT_COMPONENT_INTEGER.There are ~1~ enemies left.
~a_X~For translations, refers to ~a~ placeholders out of the usual order.Get the ~a_1~ from the ~a_0~.
~1_X~For translations, refers to ~1~ placeholders out of the usual order.There's ~1_1~ enemies left out of ~1_0~.
~x~Unknown. Related to subtitles.
~z~At the start of a string, makes the string hidden if subtitles are turned off.~z~Fucking terrorists. There's been a big scare
Input codes
LabelDescriptionExample
~INPUT_...~In help messages and other supported contexts, shows the current key for a specified control .controlPress ~INPUT_CONTEXT~ to stand up.
~INPUTGROUP_...~In help messages and other supported contexts, shows a specified input group's hint.If your car is upside down, try rocking ~INPUTGROUP_VEH_MOVE_ALL~ to flip it over.
~ACCEPT~Shows the button to accept a prompt.

Source scope and usage notes

Formatting tokens are interpreted by GTA text APIs, not by ordinary HTML or NUI text. Colors, reset tokens, style switches and inserted control icons have different roles. Follow a temporary color with a reset when the rest of the message should use its normal context color.

Images are served from this repository, not hotlinked. Empty source fields and unknown identifiers are retained as unknown. View the official source  or download the complete dataset.