The colors are not so much colors as tints. Behind the scenes there is a lot going on with them.
The colors have to work in light and dark mode, and they are displayed in a variety of ways (for example disabled and selected) and purposes (including in images).
So it is not anywhere near as simple as just "add a custom color".
Primarily they are based on hues, using 0, 30, 46, 106, 170, 190, 237, and 300 (plus the search one which has its own complexity).
There aren't a lot of values left in there that would be usefully distinguishable.