Skip to content

Conversation

@JacksonZ03
Copy link
Contributor

@JacksonZ03 JacksonZ03 commented Jan 27, 2026

Note: This is a re-implementation of the preserve-colors feature proposed in #106 to resolve conflicts introduced by @waymondrang in the redesign.

Problem

The Invert checkbox inverts all colored text in the Google doc.

However, this is very unintuitive since you'll have to guess at the opposite color if you want to set the text to a particular color - e.g. for green text, you'll have to set it to magenta.

This was referenced in these issues:
#95
#77

Feature

Add a "Preserve Colors" checkbox to prevent colored text from being inverted in dark mode.
Screenshot 2026-01-24 at 20 31 16

This keeps the existing text hues as they are and allows only the brightness to change so only black and white text get flipped as usual.

Code Changes

  1. src/types.ts - add a new flag to InvertMode.
  2. src/values.ts - add the new invert mode and set that as the default option (This is the default behaviour most users would naturally expect from dark mode - people don't want everything to be turned to grayscale).
  3. src/docs.ts - add new case for preserve_colors option.
  4. src/popup.html - added new "Preserve Colors" alongside existing "Gray" and "Black" in UI.
  5. src/popup.ts - implement event listener and button element.

P.S: Please don't make any other changes before merging this (unless there's no conflicts obviously) - I really don't want to have to keep reimplmenting the feature over and over just to keep up with changes. Thanks 🙏🏻

@JacksonZ03
Copy link
Contributor Author

I do have other ideas in terms of making the design better overall and removing the invert modes in Light mode altogether since it's unnecessary, but those can be added after this is merged.

set default updated invert mode to colorful
@waymondrang
Copy link
Owner

I renamed "preserve colors" to "colorful" due to its character length and the fact that the addition of hue-rotate doesn't exactly keep the original colors. Despite this, this "preserve colors" mode is much better than the old normal invert mode. Merging now, good work!

@waymondrang waymondrang merged commit fbd88d0 into waymondrang:main Jan 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants