Closed olivroy closed 2 weeks ago
You can explicitly set both the background color and foreground color using combine_ansi_styles()
e.g.
library(cli)
black_on_white <- combine_ansi_styles(bg_white, col_black)
black_on_white("aaa")
If you're terminal has "truecolor" support then instead of using the system palette "colors" you can even explicitly set the foreground/background colors using "#RRGGBB"
color strings using make_ansi_style()
(with combine_ansi_styles()
).
Yeah, we set bg and fg colors independently, and I think for simplicity we should keep it that way.
In light theme, it looks pretty good.
with theme = Chrome:
On some dark themes, for example, using
text is not readable.
Could the default be tweaked a bit ? or otherwise, is there a way I can do I do this myself?
Text seems to appear white by default in most
bg_*()
fn, but on bg_cyan, bg_green, bg_yellow black text seems to be a better choice for readability.