How to send colored chat messages in Minecraft
Type /tellraw @a {"text":"Server restarting in 5 minutes","color":"red"} in chat as an operator to send everyone a red message.
tellraw
Sends a formatted chat message, written as a text component, with colors, hover text and click actions.
/tellraw <targets> <message> Examples
/tellraw @a {"text":"Server restarting in 5 minutes","color":"red"} A red warning in chat.
/tellraw @a {"text":"Join our Discord","color":"aqua","click_event":{"action":"open_url","url":"https://example.com"}} A clickable link.
Arguments
targetsRequired- Players who see the message.
messageRequired- Text component, such as
{"text":"Hi","color":"gold"}.
What it does
The message is a text component rather than plain text, so you can set colors, bold, translations, scores and clickable links. Since 1.21.5 text components are written as SNBT, and click actions use snake_case keys such as click_event with a url field; older guides that show clickEvent are out of date.
Good to know
- Needs operator permission level 2.
Run it on your server
On a SLASHPLAY server, type it in the Console tab without the leading slash; in game, operators type it in chat with the slash. New to this? Start a Minecraft server first.
Your own
Minecraft server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.