toqito icon indicating copy to clipboard operation
toqito copied to clipboard

Make sure images show up properly in dark mode of the documentation

Open purva-thakre opened this issue 9 months ago • 4 comments

We use the furo theme to build our documentation. This theme has an option to choose which images to show depending on light/dark mode.

https://pradyunsg.me/furo/reference/images/#different-images-for-dark-light-mode

As some images in the documentation blend into the background in dark mode, we want to

  • [ ] invert the color of all images under docs/figures and add them to docs/figures as some_image_inverted
  • [ ] Edit all the images/figures in the documentation such that :class: only-dark is used for the inverted image and :class: only-light is used for the original image.

https://tex.stackexchange.com/questions/29227/can-includegraphics-be-used-to-change-an-image-color

purva-thakre avatar Mar 25 '25 15:03 purva-thakre

@vprusso Do you still have access to the LaTeX source code that was used to generate the images in the documentation?

In case the inverted images don't appear clean, we could try recreating the images with inverted colors.

This was tried in the past for the toqito logo, and it did not look clean. https://github.com/vprusso/toqito/issues/467#issuecomment-2067755847

purva-thakre avatar Mar 25 '25 16:03 purva-thakre

@vprusso Do you still have access to the LaTeX source code that was used to generate the images in the documentation?

In case the inverted images don't appear clean, we could try recreating the images with inverted colors.

This was tried in the past for the toqito logo, and it did not look clean. #467 (comment)

Yes, the .tex files responsible for generating the images are contained within the figures/ directory: https://github.com/vprusso/toqito/tree/master/docs/figures

vprusso avatar Mar 25 '25 16:03 vprusso

Oh. I did not pay close attention to what was in docs/figures/. Thanks!

purva-thakre avatar Mar 25 '25 16:03 purva-thakre