vedang / pdf-tools

Emacs support library for PDF files.
https://pdftools.wiki
GNU General Public License v3.0
641 stars 90 forks source link

Add `recolor-hue` option to preserve hue when recoloring the PDF #169

Closed fw623 closed 2 years ago

fw623 commented 2 years ago

This uses the algorithm from zathura/render.c to preserve hue when recoloring the PDF. How it looks can be seen in https://github.com/politza/pdf-tools/issues/608 for example.

I realized after implementing this that #69 achieves pretty much the same as this PR, so feel free to choose that one if it is preferred. The main difference (apart from the algorithm) is that this PR uses a minor mode (pdf-view-recolor-hue-minor-mode) to toggle the new :render/recolor-hue epdfinfo option.

vedang commented 2 years ago

I'll prefer #69 over this if you don't mind. It's been pending for a while, but I will find some time to review / merge it in soon.

fw623 commented 2 years ago

Sure, that's fine by me