A chat message with colours that can run a command, open a link or show text when the mouse is over it. Type it, try it in the preview, copy the /tellraw command for your version.
Command
How to write the text
&a to &f and &0 to &9 are the 16 colours. 7FF99 is any hex colour.
&l bold, &o italic, &n underline, &m strike, &k scrambled, &r back to the message colour.
A new line in the box is a new line in chat.
Good to know
The click and the hover text cover the whole message.
"Run a command" runs it as the player who clicks, with that player's permissions.
"Open a link" needs a full address that starts with https://. The player gets a question before the link opens.
The names of the click and hover parts changed in 1.21.5. Pick your version, or the command is refused.
Long messages do not fit in chat (256). Paste them into a command block, or use the server console without the /.
Something wrong or missing here? Tell me, requests decide what I add next. More tools: all tools.