Adjustable foreground/background in presentation



I currently trust pdf for all my presentations; the lecture slides made with Rmd->beamer, and talks with Keynote. I've tried html frameworks a few times but so far haven't seen a clear advantage (and find pdf more reliable and portable).

However, I've recently been considering how the background of my slides is often not well-adjusted to the room (because I necessarily prepared it somewhere else, before the talk/lecture). In particular, the contrast and brightness of the main text and the background could really use some last-minute adjustment to the presentation conditions. For instance I find that my beamer template (m theme) still has a background that is too white (98% grey) for the comfort and attention of the audience (staring at a bright rectangle in a dim room – we're so used to it that it took me a while to realise that this is not conducive to paying attention to the lecturer, or even to the material on display). I can easily pick a more balanced theme setting (95% seems sensible, coincidentally also ggplot2's grey theme), but it got me thinking: could this be embedded in the presentation software? (not with beamer or Keynote, as far as I know).

Some html frameworks (bootsrap, I think? but also bookdown's default output) provide a switch to different font sizes, theme, etc. for the reader of a webpage to adjust their experience to their optimum level of comfort. Could the same be done with, say, xarigan? I'm thinking of a simple discrete slider for the equivalent of "fg" and "bg" parameters in beamer, tuning their brightness/darkness (and having other elements inherit this overall setting to adjust harmoniously).

Obviously the most effective strategy would be to recompile the entire document, so that even plots etc. also adjust, but I'm thinking of a light-weight (and much less risky!) alternative for when you're about to start a talk.