CGA is even more nuanced than just two palettes. You can choose from three palettes, and each can be set to low intensity or high intensity, so you can effectively choose from six. On top of that, the background colour for each palette (colour 0 which defaults to black) can be set to any colour from the full CGA 16 colour palette! I wrote a sample program for a friend recently to demonstrate this https://github.com/samizzo/cgasample