hn.today

Satin: Dark mode PDF reader via affine mapping on Oklab lightness dimension

github.com4 points0 comments
Screenshot of Satin: Dark mode PDF reader via affine mapping on Oklab lightness dimension

Satin is a lightweight browser extension that implements a non-destructive dark mode for PDF viewing by applying an affine transform to the Oklab lightness dimension of page colors. Instead of a blanket inversion, it remaps whites to a dark gray and blacks to a lighter gray, preserving relative contrast while avoiding high-contrast artifacts; images and diagrams keep their original colors so visual content remains accurate. The extension ships with a default dark-mode toggle and links for Firefox and Chrome installs, plus an example screenshot demonstrating the effect.

All recoloring and any per-PDF custom color choices are performed and stored locally on the user’s device to protect privacy. The repository includes source files, icons, a reader patch, README, and an MIT license; it’s a small actively edited project (37 commits at the time of snapshot) with minimal community exposure. The core design leverages the perceptual Oklab space to change luminance without shifting hue or chroma, which is the specific technical choice that delivers a readable, visually faithful dark-mode PDF experience.

Read on github.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.