I had tried this"separate foregound" but it did nothing for me. This "terminal" option is new; when switching to legacy console, it does not exist, but the colors are still crap.
I spend two hours with that now and finally got it back working. The logic appears to be as follows:
Console applications such as the IDE may use 16 predefined colors. In good old DOS days, these were palettized; 0-7 being rather dark colors for use as background, 8-15 were brighter. Turbo pascal allowed to manually assign these 16 palette entries to the elements of the IDE, but in the FPC IDE it is fixed.
You can see the 16 colors in the color dialog of the cmd shell, in the small boxes. The IDE uses these colors, but they are no longer fixed, instead window allows you to set them them to millions of arbitrary RGB values. Why they appear to be set to different default values than before I have no idea.
But anyway, to adjust the IDE, you need to go though these 16 predefined colors and adjust their R,G and B values. This is rather tedious, as you need to find out for each IDE element which color entry it is allocated to. E.g. the background is No.1, the second box from the left.
When doing that, the shell itself will probably look awful, because its four colours for text, background, popup and popup background are based on the same 16 entries. Don't worry about that, just adjust the RGB values so that the IDE looks ok; in the end, select four colors from the 16 for the cmd shell, but don't touch the RGB settings again.
Amendment: This explains why and how MS messed it up.
https://devblogs.microsoft.com/commandline/updating-the-windows-console-colors/I have still not found an easy way to reset the color scheme to the old default. The article talks about a colortool which I can get from github ... need to built it from the source... it is certainly faster to re-adjust it all manually.