FiveM Color Codes
Both families in one place — the ^ chat carets and the ~r~ script tokens — with a live preview and a decoder for strings you already have.
The preview applies both families at once so you can see either kind of string, but the game does not: carets only render in chat and server names, tildes only in native text draws. Colour stays on until the next code, a reset or the end of the line.
FiveM chat color codes — the ^ family
These are the codes the chat resource and the server browser read. A caret plus a digit sets the colour; the four punctuation codes toggle a format on and off again. Click any row to insert it.
| Code | Colour | Hex | Preview |
|---|
Some custom chat resources only implement ^0–^7 — test ^8 and ^9 on your own server before you rely on them.
FiveM ~r~ color codes — the script family
Native text draws — notifications, subtitles, help prompts, marker labels — use tilde tokens instead. These are GTA V engine constants, unchanged for a decade and untouched by the Legacy to Enhanced migration.
| Code | Meaning | RGB | Preview |
|---|
Also recognised: ~w~ white, ~c~ grey, ~l~ black. Tokens combine — ~h~~r~ is bold red.
Which family goes where
FiveM has two colour systems and they do not overlap. Getting the wrong one is behind most of the "my colours print as text" threads.
- Caret codes are read by the chat resource and the server browser. They work in chat messages, in sv_hostname, in most /me and /do output, and anywhere a script pushes text through chat.
- Tilde tokens are read by the game engine's own text renderer. They work in notifications, subtitles, help text and anything drawn with a native text command — the strings you put in Lua, not the ones you type into chat.
Put a caret code in a notification and the player sees the literal characters ^1. Put ~r~ in a chat message and they see ~r~. Neither is an error you will get told about — it just renders wrong.
How the codes behave
- A colour stays in effect until another colour code, a reset, or the end of that message. Every new chat line starts at the default again.
- ^7 and ^0 are both white; ^7 is the conventional "back to normal" after a coloured word.
- The format carets toggle — a second ^* turns bold back off. ^r clears colour and every format at once.
- ~n~ breaks to a new line inside a text draw, and ~s~ is the tilde reset: standard white, no bold.
- Codes count toward length limits. A server name that is half codes shows far fewer visible characters than you counted — the decoder above gives you the stripped length.
- Colour is cosmetic. It never changes who can read a message or how it is routed, so it is not a permission system.
FAQ
What are the FiveM color codes?
There are two separate families. Chat messages and server names use caret codes — ^0 to ^9 for color, plus ^* ^_ ^~ ^= for bold, underline, italic and strikethrough. Native script text such as notifications and subtitles uses tilde tokens instead, like ~r~ for red and ~b~ for blue. The two are not interchangeable.
Why doesn't ~r~ work in chat?
Because ~r~ is read by the game's own text renderer, not by the chat resource. Inside a chat message or a server name it prints as the literal characters ~r~. Use ^1 for red in chat, and keep ~r~ for native text draws like notifications and help prompts.
How do I color my FiveM server name?
Put caret codes straight into sv_hostname in server.cfg — for example sv_hostname "^1Vorla ^7RP ^3| ^7Whitelisted". Restart the server for the change to appear, and keep the visible part short: the codes themselves eat into the name length the browser shows.
Does ^0 mean black in FiveM?
No — in FiveM ^0 is white. That is where it differs from the Quake-style code lists people copy from elsewhere. ^7 is white too, and is the conventional way to get back to the default color after a colored word.
How do I reset formatting in the middle of a line?
^r clears the color and every active format and returns the rest of the line to the default. In native script text the equivalent is ~s~, which goes back to the standard white and drops the ~h~ bold weight.