Is there a such thing as a large palette program?

Question

Sorry if this is the wrong place to ask, but is there a program that is designed to make large color palettes meant for games?
Retro games like Doom, Quake, Heretic, Duke Nukem, etc. had large color palettes, I think Doom specifically had 256 colors in it’s palette. I’m making a retro first person shooter and would like to know if there’s any program that is designed for large palettes to use for textures and a tonemap.

While I’m at it, how would I make a shader that restricts every color on screen to this palette, similar to doom?

Like this:

Thanks,
WigglyStuf