Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update images to support dark mode #7195

Merged
merged 7 commits into from
Jun 5, 2024
Merged

Update images to support dark mode #7195

merged 7 commits into from
Jun 5, 2024

Conversation

loganthomas
Copy link
Contributor

Closes #7187

Description

Adding better support for dark mode image rendering.

  • Can explicitly change the background to be white instead of transparent
  • Can have two versions of each image (light and dark) and use GitHub's theme context for images in Markdown
  • Can have some combination of both of the above

Discussion

I elected to have the smallest change possible here and explicitly changed the transparent backgrounds to white for docs/assets/IRgraph_markstep.png, docs/assets/IRgraph_no_markstep.png and docs/assets/pytorchXLA_flow.svg.

Another approach is to use GitHub's theme context for images in Markdown. For docs/assets/spmd_debug_1.png and docs/assets/spmd_debug_2.png I decided to use a light theme for these images and upload.

I don't think you want to have 2 versions of every image floating around, but for some cases (like the docs/spmd.md) it may make sense to have this as a toggle of images

Happy to update the PR accordingly. Thanks!

Examples

docs/assets/pytorchXLA_flow.svg before
Screenshot 2024-06-04 at 21 20 58

docs/assets/pytorchXLA_flow.svg after
Screenshot 2024-06-04 at 21 22 18

docs/assets/IRgraph_no_markstep.png before
Screenshot 2024-06-04 at 21 21 13

docs/assets/IRgraph_no_markstep.png after
Screenshot 2024-06-04 at 21 22 30

docs/assets/IRgraph_markstep.png before
Screenshot 2024-06-04 at 21 21 23

docs/assets/IRgraph_markstep.png after
Screenshot 2024-06-04 at 21 22 46

docs/spmd.md dark toggle update
Screenshot 2024-06-04 at 21 23 42

docs/spmd.md light toggle update
Screenshot 2024-06-04 at 21 24 07

docs/spmd.md light toggle before (in light mode)
Screenshot 2024-06-04 at 21 24 48

Copy link
Collaborator

@JackCaoG JackCaoG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JackCaoG JackCaoG merged commit cdb4aec into pytorch:master Jun 5, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update diagrams to work with dark mode
3 participants