Set own RGB palette in the Terminal

Can I set my own RGB color palette in the terminal in the program? If so, in what way?

Yes, from settings in terminal or using Theme Manager (HaikuDepot).

Do you mean setting them manually as an user, or setting them from an application? The latter is possible using some escape sequences, as far as I know we should be following the standards set by Linux terminals.

I am trying to set the palette with esc sequence:


but it doesn’t work.

The first one should work, I think.
I’m not sure what exact sequence is recognized, but it looks like ESC ‘]P4;c;xxx’ BEL where c is the color number you want to change (0-255) and xxx is the color specification. Acceptable formats for the specification:


color names from can also be used.

Parsing happens here: and here: