Open tomoki1207 opened 4 years ago
I also want to be able to change the background color, the white background is too harsh
were you able to change the background?
I also want to be able to change the background color, the white background is too harsh
The extension doesn't seem to provide this functionality.This is the reason I gave up using it to read a lot of documentation
The extension doesn't seem to provide this functionality.This is the reason I gave up using it to read a lot of documentation
Did you find any alternative extension which provides dark PDF viewer facility?
I'm just a little annoyed as the showcase gif's got the dark theme
Zathura PDF viewer lets us choose color theme as follows: (Solarized Dark Theme)
set default-bg "#073642" # base02
set default-fg "#93a1a1" # base1
# zathurarc-dark
# Refer: [zathura-solarized/zathura-solarized-dark at master · lennonwoo/zathura-solarized](https://github.com/lennonwoo/zathura-solarized/blob/master/zathura-solarized-dark)
set notification-error-bg "#586e75" # base01 # seem not work
set notification-error-fg "#dc322f" # red
set notification-warning-bg "#586e75" # base01
set notification-warning-fg "#dc322f" # red
set notification-bg "#586e75" # base01
set notification-fg "#b58900" # yellow
set completion-group-bg "#002b36" # base03
set completion-group-fg "#839496" # base0
set completion-bg "#073642" # base02
set completion-fg "#93a1a1" # base1
set completion-highlight-bg "#586e75" # base01
set completion-highlight-fg "#eee8d5" # base2
# Define the color in index mode
set index-bg "#073642" # base02
set index-fg "#93a1a1" # base1
set index-active-bg "#586e75" # base01
set index-active-fg "#eee8d5" # base2
set inputbar-bg "#586e75" # base01
set inputbar-fg "#eee8d5" # base2
set statusbar-bg "#073642" # base02
set statusbar-fg "#93a1a1" # base1
set highlight-color "#657b83" # base00 # hightlight match when search keyword(vim's /)
set highlight-active-color "#268bd2" # blue
set default-bg "#073642" # base02
set default-fg "#93a1a1" # base1
# set render-loading true
# set render-loading-fg "#073642" # base02
# set render-loading-bg "#073642" # base02
# Recolor book content's color
set recolor true
set recolor-lightcolor "#073642" # base02
set recolor-darkcolor "#93a1a1" # base1
# set recolor-keephue true # keep original color
Refer to https://www.cnblogs.com/yf-zhao/p/16127156.html/, I solved the problem in the following way.
Open the file at: ~\.vscode\extensions\tomoki1207.pdf-1.2.2\lib\web\viewer.css
Rewrite line 693 as: --body-bg-color: rgb(0, 0, 0);
Add a line of code filter: invert(88%);
in the following places: #sidebarContainer, #viewerContainer, #toolbarContainer
Open the file at:
~\.vscode\extensions\tomoki1207.pdf-1.2.2\lib\web\viewer.css
\ Rewrite line 693 as:--body-bg-color: rgb(0, 0, 0);
\ Add a line of codefilter: invert(88%);
in the following places: #sidebarContainer, #viewerContainer, #toolbarContainer
It seems to be enough to add #viewerContainer{filter: invert(1);}
after line 813 (inside the @media (prefers-color-scheme: dark)
block) to invert the PDF view colors (when system-theme is dark).
Could provide some user settings like James-Yu/LaTeX-Workshop color/invert-mode options of their internal PDF-viewer.
Open the file at:
~\.vscode\extensions\tomoki1207.pdf-1.2.2\lib\web\viewer.css
Rewrite line 693 as:--body-bg-color: rgb(0, 0, 0);
Add a line of codefilter: invert(88%);
in the following places: #sidebarContainer, #viewerContainer, #toolbarContainerIt seems to be enough to add
#viewerContainer{filter: invert(1);}
after line 813 (inside the@media (prefers-color-scheme: dark)
block) to invert the PDF view colors (when system-theme is dark).Could provide some user settings like James-Yu/LaTeX-Workshop color/invert-mode options of their internal PDF-viewer.
#viewerContainer{filter: invert(88%);}
perfectly fits my need, thank you both!
The preview is not supported to change color(text, background, ...).
Approaches
1. Can select a theme.
Toggle these from settings.
Pros
Can toggle automatically via the VSCode theme(Darkmode or not).
Cons
2. Can change each color.
Set value to these from settings.
Pros
Can set each color as users like.
Cons
Refs
22
49