Using Color Codes in IW4x Server Names and Messages
A complete reference for IW4x color codes usable in server names, MOTD, and in-game messages.
Using Color Codes in IW4x Server Names and Messages
IW4x supports color codes in server names (sv_hostname), message of the day (sv_motd), and any admin-sent messages. Color codes follow the classic Quake-style ^N syntax inherited from the CoD engine.
Color Code Reference
| Code | Color | Hex Approximation |
|---|---|---|
^0 |
Black | #000000 |
^1 |
Red | #FF0000 |
^2 |
Green | #00FF00 |
^3 |
Yellow | #FFFF00 |
^4 |
Blue | #0000FF |
^5 |
Cyan / Light Blue | #00FFFF |
^6 |
Pink / Magenta | #FF00FF |
^7 |
White (default) | #FFFFFF |
^8 |
(unused/varies) | — |
^9 |
Grey | #808080 |
^: |
Rainbow (cycling) | animated |
^7 is the reset code — it returns text to the default white color. Always end a colored name with ^7 unless you intentionally want color to bleed into adjacent UI elements.
Where Color Codes Work
Color codes render in:
sv_hostname— server name in the browser and in-game scoreboard headersv_motd— message displayed to players on connectsayRCON command — admin broadcast messages- IW4MAdmin
!saycommand - Player chat messages (clients can color their own chat text)
sv_maprotationdoes not render colors — map and gametype names are internal identifiers
Coloring sv_hostname
// Simple two-color name
set sv_hostname "^2DustBowl ^7TDM Server"
// More elaborate name
set sv_hostname "^3[^1MW2^3] ^2Best ^7Server ^3#1"
// Gradient-style using multiple codes
set sv_hostname "^1D^2u^3s^4t^5B^6o^7wl ^2Gaming"
// Rainbow prefix, white name
set sv_hostname "^:RAINBOW ^7Normal Name"
Tips:
- Keep the name readable — excessive color changes make it hard to scan in the browser
- The server browser truncates long names; stay under 40 characters total (including color codes, which don't count toward visible length)
^0(black) is invisible against most backgrounds — avoid it^4(blue) can be hard to read against dark server browser backgrounds; use^5(cyan) instead for visibility
Coloring sv_motd
set sv_motd "^2Welcome ^7to the server! ^3Rules: ^7No cheating, no slurs."
The MOTD is displayed on a dark background overlay when players first connect. Avoid ^0 and ^4 here.
Color Codes in IW4MAdmin Messages
When using IW4MAdmin's !say command or configuring automated messages in IW4MAdminSettings.json, the same color codes apply:
// In-game chat (from admin)
!say ^2Welcome ^7to the server!
// In IW4MAdminSettings.json auto-messages array
"AutoMessages": [
"^3Server Rules: ^7No cheating! Type ^2!rules ^7for the full list.",
"^5Visit our Discord: ^7discord.gg/example"
]
Stripping Color Codes
Some external tools (including IW4MAdmin's web panel) automatically strip color codes from displayed names for cleaner rendering. If you're building tools that read server names or chat logs, filter out \^[0-9:] patterns to strip the codes:
import re
def strip_colors(text):
return re.sub(r'\^[0-9:]', '', text)
Complete Server Name Examples
Here are some ready-to-use server name styles for sv_hostname:
// Clean and professional
set sv_hostname "^2[TDM] ^7My Server"
// Bracketed clan tag
set sv_hostname "^3[^2CLAN^3] ^7Public Server ^9#1"
// Game mode highlighted
set sv_hostname "^1Search ^7& ^1Destroy ^7Only"
// Region + mode
set sv_hostname "^5[EU] ^2All Modes ^7Server"
// Minimal with color accent
set sv_hostname "^2My^7Server"
Common Mistakes
Color bleeds into scoreboard: Forgetting to end the name with ^7. Fix: always add ^7 at the end.
Name looks different in browser vs. in-game: Some server browser implementations strip or don't render certain codes. Test how your name looks from an actual IW4x client.
Using ^0 black for "style": Black text on most backgrounds is invisible or nearly invisible. Players will see a blank or truncated name.
Too many color changes: Names like ^1A^2B^3C^4D^5E^6F are hard to read and look unprofessional. Two or three colors maximum is a good rule.