This program was created so that owners of CGA cards and monitors (and emulator authors) could adjust their hardware/software so as to get the "proper" AUTHENTIC CGA palette. Simply download this program to your vintage PC and run it, answer the question, and then adjust the monitor so that it looks like this: If running this program under Windows just to see what it does, make sure you hit ALT-ENTER so it is running fullScreen before you answer the initial hardware compatibility question. Otherwise the colors will be wrong, as it will be running in a window and using the incorrect Windows palette (instead of the VGA card's BIOS colors). To anyone who looks at the CGA pinout, it appears that the logical color for #6 would be dark yellow instead of the much darker brown we are familiar with. But CGA monitors display brown, not dark yellow. How? It turns out that the monitor does the translation, and IBM intentionally added logic in the monitor to decrease The Green component on color #6 so that it would appear brown.
Thanks to Chuck Guzis (for the Schematic) and Tony Duell (for the info), here is an extensive explanation of how this is achieved. First, to follow along, download this schematic page of the monitor's circuit board (there are other schematics in the IBM Tech Ref but this page is the only one needed to follow along). Okay, now that you've done that, here's Tony's explanation:
Let's start on the CGA card itself. The attribute data from the video RAM is latechs in U35 ('273). The outputs of that go to a 4-bit 4-way multiplexer (U9, U10, '153), which, selects one set of 4 bits or the other depending on wheter that particular dot in the characer cell is set or not (OK, there's a lot more to it, blink mode, graphics modes, etc, but I don't want to have to explain all 6 pages of the schematic at this point).