Variable: pdf-view-midnight-invert

pdf-view-midnight-invert is a customizable variable defined in pdf-view.el.

Value

t

Documentation

In midnight mode invert the image color lightness maintaining hue.

This is particularly useful if you are viewing documents with color coded data in plots. This will maintain the colors such that blue and red will remain these colors in the inverted rendering. This inversion is non-trivial. This makes use of the OKLab color space which is well calibrated to have equal perceptual brightness across hue, but not all colors are within the RGB gamut after inversion, causing some colors to saturate. Nevertheless, this seems to work well in most cases.

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-view.el
(defcustom pdf-view-midnight-invert t
  "In midnight mode invert the image color lightness maintaining hue.

This is particularly useful if you are viewing documents with
color coded data in plots.  This will maintain the colors such
that blue and red will remain these colors in the inverted
rendering. This inversion is non-trivial. This makes use of the
OKLab color space which is well calibrated to have equal
perceptual brightness across hue, but not all colors are within
the RGB gamut after inversion, causing some colors to saturate.
Nevertheless, this seems to work well in most cases."
  :group 'pdf-view
  :type 'boolean)