How to put a colored background to a text? '

Hi, I’m trying to put a background to several texts of different scripts but I have no result. I tried to put a background to the text of automatic messages in the chat but I only managed to change the colors of the letters … can anyone help me?

This is the automatic message but I would like to put a color background to all the text but I have no results.;:

config={}
config.time = 1 – 5 is 5 min you can put what you want ex 3 would be 3 min this would be how long it would send each message
config.name = ‘^1Nio ^0RP ^1v1’ – change this to your server name
config.enabled = true
config.messages = {
‘Value your life and don’t forget to feed yourself’,
‘Value your life and don’t forget to feed yourself’,
‘Value your life and don’t forget to feed yourself’,
‘Value your life and don’t forget to feed yourself’,
‘Value your life and don’t forget to feed yourself’,
}
config.tfmsg = {
[true] = ‘Activado’,
[false] = ‘Desactivado’

}

I believe the only way to change the background color of a chat message requires modification of the chat resource.

Do you mean chat in general? or this chat of each script?
https://gyazo.com/fd355fe69446141f4afc1fc0dfc83043

1 Like

If you want only for specific messages see chat:addTemplate - Cfx.re Docs

Else create a chat theme

1 Like

Take a look at the chat templates I linked

You can’t put a background on it just an emoji and color the letter.
https://docs.fivem.net/resources/chat/events/chat-addTemplate/
or something wrong

It’s just an example, you can replace it by any div/span with background-color