I've been mapping old palettes today.
The most common set up for hardware palettes is just to map out a rgb colourspace with as much precision is required/available. You decide how many shades of red, green and blue you'll allow for, and then you get all the colours you can make with combining those shades. The spectrum uses two shades each of red green and blue (off and on, basically) the CPC uses three, EGA uses four.
When actually drawing stuff, you pick a smaller subset from the master pallete that best suits the subject. For 8-bit systems there's generally some heavy restriction for how much data you can draw on the screen, so you get different screen modes.
The CPC is pretty typical, and especially pretty, so I'll use it for example:
mode 0: 160 by 200 (low-res, wide pixels, 16 colours)
mode 1: 320 by 200 (regular pixels, 4 colours)
mode 2: 640 by 200 (high res, tall pixels, 2 colours - haven't found examples of this, but you get the idea)
Because we live in the future, you get to make it up a bit, but knowing how this stuff is constructed makes it easier to imitate. I'd recommend just commandeering one of these palettes, and culling the colours you don't need.