feat: add configurable dark mode themes #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/theme-selection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add theme selector dropdown with 6 options including Claude Warm, ChatGPT Cool, and other comfortable dark backgrounds. Improves readability by replacing harsh black inversion with softer color mapping.
Pull Request Overview
This PR adds configurable dark mode themes to the PDF converter, replacing the harsh black inversion with softer color mapping options. Users can now select from 6 different themes including Claude Warm, ChatGPT Cool, and other comfortable dark backgrounds for improved readability.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@ -200,2 +265,4 @@progressBar.style.width = '0';progressText.innerText = `0/${pdf.numPages}`;pdfContainer.innerHTML = '';The brightness calculation uses simple averaging instead of the more accurate luminance formula. Consider using
0.299*r + 0.587*g + 0.114*bfor better perceptual brightness calculation.@ -201,2 +268,4 @@for (let i = 0; i < pdf.numPages; i++) {if (renderId !== currentRenderId) {return;Missing documentation for the themes object. Add a comment explaining the structure and purpose of the RGB values for each theme.
No validation that
selectedThemeexists in the themes object. If an invalid theme is selected, this will throw an error when accessing.nameproperty.@amanyadev
is nice idea but is not fully polish
@Copilot please fix the 1 and 2
@amanyadev
thanks for the PR
thanks for creating this @Chizkiyahu. It helped me while studying. Glad that I could contribute!