forked from vedang/pdf-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hue contribution of background color to inverted midnight mode
From the comments in the PR, @smithzvk explains the changes: > I was bugged that it didn't pick up the hue from the background, > however, so I made the all color a/b parameters start from the a/b > parameters of the BG color. This makes the PDF background (white) > map to your BG color and PDF foreground (black) map to your FG > color, which can be set to your theme background making it seem > pretty seamless. Note that if you set your BG and FG to a color > theme without zero saturation (a gray tone of some sort), then you > recover the original behavior. > > I also reinstated the cached transforms for background and the last > color computed. > > I also refactored the loop to move the switch statement outside of > the loop. It is more repetitive, but it was needed to get rid of > some warnings about potentially uninitialized variables. It should > also be faster as the branch was removed from the loop. > > I also ditched the gamma correction as it seemed to be doing the > wrong thing and I never had a theoretical reasoning for it. I can > get similar results if I just set my BG color to something like > gray5 instead of black. Barely a difference in background but the > hinting on the fonts is showing again. The root of my issue may > have always been some kind of display calibration issue. Closes: vedang#197
- Loading branch information
Showing
1 changed file
with
78 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters