Is there a way to turn off dark mode only on PDFs

Hi there,
Is it possible to turn off the dark mode on PDF preview? I am learning radiology and it’s kinda pointless when I am looking on RTG pictures lol.

Yes, use Custom CSS (What is Custom CSS and how do I use it?):

.dark-mode, .dark-mode .PdfHighlighter {
  filter: invert(100%) hue-rotate(180deg);
}

Thank you very much @hannesfrank

It might have been due to an update but this code did not seem to work for me.
I tried this instead and it comes out perfectly:

.PdfHighlighter .pdfViewer {
  filter: invert(100%);
}

The fix by @Marceau seems to introduce a translucent layer over the pdf after a recent update. Is there a way to remove this?

@hannesfrank Thanks for your answer. Do you know how I might change the background colour of a pdf to be less dark. I find reading white text on a black background too contrasty. I would like to make the background grey. Any help would be appreciated. I am not familiar with this stuff.

I suppose you can change hue-rotate parameter from 180deg to like 90deg

There are multiple possibilities, but all do somewhat affect the color of the pdf’s content (text images) as well:

(1) Most generally overlay a translucent layer over the whole pdf. You can even configure a warm, reddish background-color.

.pdfViewer .page .canvasWrapper::before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(130, 120, 100, 0.2);
}

(2) Add a contrast or brightness term to the .pdfViewer filter. Here you need to play a bit and see what you like. E.g. reducing brightness leaves black dark (inverted in /dark mode) while reducing contrast moves everything to grey.

.PdfHighlighter .pdfViewer {
  filter: brightness(0.7);
}

Thanks guys! This has solved my issue. I am using:

.PdfHighlighter .pdfViewer {
filter: brightness(0.93);
}