A Chrome extension that instantly inverts PDF colors for better readability and reduced eye strain, especially in dark environments.
- 🌓 One-click PDF dark mode toggle
- 🚀 Instant color inversion without page reload
- 💡 Smart page detection (only works on PDF files)
- 🎨 Clean, modern user interface
- 👁️ Reduces eye strain in dark environments
- 🔄 Easily toggle between light and dark modes
- Visit the Chrome Web Store (link coming soon)
- Click "Add to Chrome"
- Confirm the installation
Or install manually:
- Clone this repository:
git clone https://github.com/ashrithsathu/pdf-color-inverter.git
- Open Chrome and go to
chrome://extensions/
- Enable "Developer mode" in the top right
- Click "Load unpacked" and select the
dist
folder from the cloned repository
- Open any PDF file in Chrome
- Click the PDF Color Inverter extension icon
- Press the "Enable Dark Mode" button to invert colors
- Press again to disable dark mode
The extension will automatically detect if you're viewing a PDF and enable/disable the toggle button accordingly.
This extension is built with:
- React + TypeScript for the UI
- Vite for building
- Chrome Extensions API
To set up the development environment:
-
Clone the repository
git clone https://github.com/ashrithsathu/pdf-color-inverter.git cd pdf-color-inverter
-
Install dependencies
npm install
-
Start development server
npm run dev
-
Build for production
npm run build
The extension uses the Chrome Extensions API to:
- Detect when you're viewing a PDF file
- Inject a transparent overlay with CSS mix-blend-mode
- Invert the colors of the PDF content without affecting the UI
This approach ensures:
- Fast performance (no image processing)
- Compatibility with most PDF viewers
- Preservation of text selection and interaction
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Found a bug? Please open an issue on GitHub with:
- A clear description of the bug
- Steps to reproduce
- Expected behavior
- Screenshots (if applicable)
- Browser version and OS
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all contributors who have helped with code and bug reports
- Inspired by the need for better PDF readability in dark environments
Ashrith Sathu - GitHub
Project Link: https://github.com/ashrithsathu/pdf-color-inverter