It works the other way around. The terminal emulator offers 2*8 colors for applications to choose from, in addition to the default foreground/background colors, and doesn't know / doesn't care how applications use them. (There are much more colors available for applications, but these are the standard ones, and the ones typically customized by the user.)
These colors are traditionally black, red, green, yellow (brown), blue, magenta, cyan, white (light gray) and their brighter counterpart. You can pick your exact favorite shade for them, there are a few predefined ones, but you can also create your own scheme (and of course no one forces you to actually pick colors that are similar to the usual values and correspond to the formal names, just as you did for the first color (white instead of black) (*), likely resulting in hardly readable look in several apps).
Each application decides on its own which colors it wants to use for which feature, context etc. You need to consult the documentation and settings of each application where you're interested in its use of colors.
For example, for the
ls command check the environment variable
LS_COLORS. You'll recognize the file extensions, plus there are two-letter keywords for file types. As for the values, 30–37 denote the first 8 colors as foreground ones; 90–97, or often 30–37 combined with 1 (or 01) denote the next 8 colors as foreground ones – although 1 (or 01) also makes the text bold. 40–47 stand for the first 8 colors and 100–107 for the next 8 colors as background ones. For
mc (Midnight Commander) the definitions are in the skin files under
/usr/share/mc/skins or a similar directory, and for its editor the syntax highlight files in the
syntax directory next to it. And so on... For every single application you have to individually check which colors it uses for what purpose, and whether (and if so, how) they allow to configure them. There's no common pattern or typical assignment of colors.
(*) There used to be a bug in gnome-terminal where the first color wasn't properly initialized on the UI, so perhaps it wasn't you changing it to white. This was fixed in gnome-terminal 3.20.3.