Tie together your first question with your second question, so readers know how you did your work.
Source Link

How can I change the grey background of the PDF preview in Google Chrome to black?

For example, on https://arxiv.org/pdf/1808.06394.pdf:

enter image description herePDF in Google Chrome, showing visual state

using this code in the console (and disabling the Dark Reader Google Chrome extension if it was enabled):

var cover = document.createElement("div");
let css = `
    position: fixed;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    mix-blend-mode: difference;
    z-index: 1;
`
cover.setAttribute("style", css);
document.body.appendChild(cover);

I can make the white background black:

enter image description hereGoogle Chrome PDF preview function, with Google Chrome Extension called Dark Reader

However, the background of the PDF preview in Google Chrome is still grey. Instead I would like something such as:

enter image description hereCustom rendering of ideal setting required by question asker, is not a real browser example, rendering was made in a graphics manipulation program.

Following my asking How can I preview PDFs with Google Chrome in dark mode?, now asking about changing the design for the rest of the screen.

How can I change the grey background of the PDF preview in Google Chrome to black?

For example, on https://arxiv.org/pdf/1808.06394.pdf:

enter image description here

using this code in the console (and disabling the Dark Reader Google Chrome extension if it was enabled):

var cover = document.createElement("div");
let css = `
    position: fixed;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    mix-blend-mode: difference;
    z-index: 1;
`
cover.setAttribute("style", css);
document.body.appendChild(cover);

I can make the white background black:

enter image description here

However the background of the PDF preview in Google Chrome is still grey. Instead I would like something such as:

enter image description here

How can I change the grey background of the PDF preview in Google Chrome to black?

For example, on https://arxiv.org/pdf/1808.06394.pdf:

PDF in Google Chrome, showing visual state

using this code in the console (and disabling the Dark Reader Google Chrome extension if it was enabled):

var cover = document.createElement("div");
let css = `
    position: fixed;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    mix-blend-mode: difference;
    z-index: 1;
`
cover.setAttribute("style", css);
document.body.appendChild(cover);

I can make the white background black:

Google Chrome PDF preview function, with Google Chrome Extension called Dark Reader

However, the background of the PDF preview in Google Chrome is still grey. Instead I would like something such as:

Custom rendering of ideal setting required by question asker, is not a real browser example, rendering was made in a graphics manipulation program.

Following my asking How can I preview PDFs with Google Chrome in dark mode?, now asking about changing the design for the rest of the screen.

Source Link
Franck Dernoncourt
  • 16.8k
  • 39
  • 149
  • 257

How can I change the grey background of the PDF preview in Google Chrome to black?

How can I change the grey background of the PDF preview in Google Chrome to black?

For example, on https://arxiv.org/pdf/1808.06394.pdf:

enter image description here

using this code in the console (and disabling the Dark Reader Google Chrome extension if it was enabled):

var cover = document.createElement("div");
let css = `
    position: fixed;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    mix-blend-mode: difference;
    z-index: 1;
`
cover.setAttribute("style", css);
document.body.appendChild(cover);

I can make the white background black:

enter image description here

However the background of the PDF preview in Google Chrome is still grey. Instead I would like something such as:

enter image description here