Some background for any who find this later
This is a question about colors being applied in the shell. NOT about how to CHANGE said colors (there's a bajillion answers for that). But how to READ them.
I know that a shell really doesn't define \e[31m to mean "red", but rather, represent whatever color the user happens to have slotted into the "red" slot in their terminal. This is what allows for the various color schemes/themes that a user can optionally apply to their terminal emulator application.
My question(s)
That said, is there any mechanism through which I can ascertain what color the user is... well... using for that slot? That is to say, if a user hypothetically is using (I'm gonna use hex here as a convenient descriptor; I don't care if it's in this format) #F00 (#FF0000 for you web guys) as their "red" slot, is there a way I can see that value? I mean, a user COULD put in #00F and render all things red as blue. That's totally their prerogative and business, but is there some means through which I can see that?
How about just in terms of the shell ("their active foreground color is the color located in the "white" slot), even if I don't get to know what that color is, beyond the slot identifier?
Likewise, is there a way to reset JUST the foreground and NOT the background? Or vice-versa? Or is it \e[0m or nothin'?