Christmas calendar: door 1 is open today

Open the door →
Skip to content
ModFiveM
Checking session…

Colour text in GTA and FiveM with ~codes~

Red text with ~r~, bold with ~h~, a new line with ~n~ and the player's key with ~INPUT_CONTEXT~. Write the text, see roughly how it looks in the game and copy the code that shows it.

  • Free
  • Nothing is uploaded
  • No account
  • ~r~ ~g~ ~b~

Click to put in a colour

Lua (client)

BeginTextCommandThefeedPost('STRING')
AddTextComponentSubstringPlayerName('~r~Police~s~: Stop the vehicle!~n~Press ~INPUT_CONTEXT~ to ~g~show your licence~s~. ~h~Wanted~h~ ~ws~~ws~')
EndTextCommandThefeedPostTicker(false, true)

How it looks

Roughly as in the game. 64 characters without codes.

Police: Stop the vehicle!
Press E to show your licence. Wanted ★★
Police: Stop the vehicle!
Press E to show your licence. Wanted ★★

The font and size are not the game's own. The colours are the game's default HUD colours, and ~INPUT_~ shows the control's default key. Blip and gamepad icons show as their name. Codes in a red box are ones the page does not know.

Every code

CodeColourUsed for
~r~#e03232 HUD_COLOUR_REDEnemies
~g~#72cc72 HUD_COLOUR_GREENPickups
~b~#5db6e5 HUD_COLOUR_BLUEFriends
~y~#f0c850 HUD_COLOUR_YELLOWPlaces and destinations
~o~#ff8555 HUD_COLOUR_ORANGETeam colour
~p~#8466e2 HUD_COLOUR_PURPLETeam colour
~q~#cb3694 HUD_COLOUR_PINKPink (Arena War)
~f~#5db6e5 HUD_COLOUR_FRIENDLYFriendly objectives (rare)
~d~#2f5c73 HUD_COLOUR_BLUEDARKDark blue
~c~#8c8c8c HUD_COLOUR_MENU_GREYGrey, faded text
~t~#8c8c8c HUD_COLOUR_MENU_GREYGrey, another language in subtitles
~m~#646464 HUD_COLOUR_MID_GREY_MPMid grey ("silver")
~l~#000000 HUD_COLOUR_BLACKBlack
~w~#f0f0f0 HUD_COLOUR_WHITEWhite
~s~#f0f0f0 HUD_COLOUR_WHITEBack to the default colour
~n~–New line
~h~–Bold, once more to stop
~bold~–Same as ~h~
~italic~–Italic, once more to stop
~ws~–Wanted star
~HUD_COLOUR_RED~–Any HUD colour by name
~HC_6~–Any HUD colour by number
~INPUT_CONTEXT~–The player's key for a control (help text)
~BLIP_BENNYS~–A blip icon (help text)
~EX_R*~–The Rockstar logo

All 235 HUD colours

Write ~HUD_COLOUR_NAME~ or ~HC_number~ in the text. A server can change them with REPLACE_HUD_COLOUR.

Good to know. The codes and HUD colours are taken from FiveM's documentation (docs.fivem.net, 2026-11-26). The preview is rough: the font is not the game's, blip and gamepad icons show as text, and a server may have changed the HUD colours.

Three steps

  1. 01

    Write the text

    Click a colour or code to put it in where the cursor is.

  2. 02

    See how it looks

    The preview shows the text as a notification and a help text, with the game's HUD colours.

  3. 03

    Copy the code

    Pick notification, help text or ESX.ShowNotification and copy the Lua.

Carry on in the editor

Questions and answers