Hi @havefun! Welcome!
For image outputs,
gt::gtsave() first creates a temporary HTML file, then it uses
webshot to take a screenshot of the rendered HTML (
webshot, for its part, is using the headless browser
PhantomJS to do its work). That doesn't answer exactly what's going wrong with the colors in your tables, but maybe it gives you some ideas of where to start looking?
gt is still under development, so if you can provide some code that reproduces the problem you see, that could potentially be helpful for filing a bug report. You said that this problem occurred on some machines but not others, so a good example would probably include:
- Code for a table with some colors, using one of
gt's built-in datasets
- A screenshot (taken by you, by hand!) of what that table looks like when rendered in a regular web browser (e.g., put it in an R Markdown document and render to HTML, view in browser, and screenshot)
- The image file result you get from running
gtsave() on the same table
As much system info as you can provide: OS version, R version,
sessionInfo() output from a session where you ran
gtsave(), and what version of
PhantomJS you have installed (and how you installed it)
Someone (was it you?) has recently posted an issue to
gt GitHub issue tracker about this same problem, but there's no reproducible example yet:
Addng a good, minimal example to that issue is a great way to contribute!