Console channel colors

I want to know how FiveM generates these colors. I am creating a web dashboard and I need this for the console colors.

image

Use a prefix of ^0 to ^10?

It’s somewhere in the docs or cookbook.

Im using the RegisterConsoleListener to listen for console messages. It return it like this.
image
So I cant get the colors.

Have a table with channel and color.

When receiving the message, just check that table if it contains the channel. If yes, then assign that color. If not, then get a new color and save it in that table.

Probably the easiest thing I can think of right now.

1 Like

Yeah but how do I get the correct script color to get started with?

What the hell do you mean, “the correct script colour”?

The listening event isn’t going to tell you what colour it is prefixed with.

So if you want to listen for something, just do a string match on the message or script?

Why do you want to listen for the colour?
To what end do you want to achieve?

As you can see in the picture I provided there are different colors depending on the channel. I want to get these colors so I can use them on the websites console. These colors are not random generated since they keep the same color after restart.

:wave:

1 Like