Skip to content

Add use_srgb_color_profile argument to increase portability of screenshots - #23

Closed
nstrayer wants to merge 1 commit into
masterfrom
nick-srgb-profile-argument
Closed

nstrayer wants to merge 1 commit into
masterfrom
nick-srgb-profile-argument

Conversation

@nstrayer

Copy link
Copy Markdown
Contributor

By default, chromote will mirror the color profile of the main monitor of the machine used to take the screenshot. This means that screenshots taken on a laptop plugged into an external monitor will often have subtly different colors than one taken when the laptop is using its built-in monitor. This problem will be even more likely across machines.

To remedy this we set the Chrome headless argument force-color-profile to "srgb" so the color profile used is always the same across machines/monitors.

The use_srgb_color_profile argument defaults to TRUE. This may break visual tests that use webshot() output but I think it's ultimately a better default than the non-portable mirroring of the current monitor's profile.

@nstrayer
nstrayer requested a review from wch June 30, 2021 20:41
@wch

wch commented Jul 1, 2021

Copy link
Copy Markdown
Collaborator

How about moving this into Chromote instead?

@schloerke

Copy link
Copy Markdown
Collaborator

Addressed in rstudio/chromote#57 and rstudio/chromote#58. Closing

@schloerke schloerke closed this Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants