I would like to extract the background color of the notebook being used.
Why do you want to do that ?
The reason why I want to do this is because I would like for the color of the output to always have a good contrast with that of the notebook background. I would like to do this in a way that is independent of the user's choice for the background. In particular, Print, Plot and VertexLabels tend to print the output in black which is difficult to read when using a dark theme stylesheet.
Edit
The 4th post of the link that was accepted as a similar question gives the same answer as the comment by @andre314 below but used in a slightly different context.
CurrentValue[EvaluationNotebook[], Background]or maybeSelectedNotebook[]instead ofEvaluationNotebook[]? – andre314 Jun 05 '22 at 14:52