Fix bugs with dark mode panels - #14109
Merged
Merged
Conversation
wmvanvliet
reviewed
Aug 4, 2026
| """Check whether a background color calls for light foreground colors.""" | ||
| # mne-qt-browser decides this via oklab lightness; HSV value agrees with it across | ||
| # the range of backgrounds we care about | ||
| return rgb_to_hsv(*_to_rgb(color))[2] < 0.5 |
Contributor
There was a problem hiding this comment.
we have a few other places around the codebase (search for dark) where we do almost the same thing. Could those places also call this function?
Member
Author
There was a problem hiding this comment.
Ooohh good call, I'll look!
larsoner
force-pushed
the
dark
branch
3 times, most recently
from
August 4, 2026 13:35
0a4ab10 to
85fc788
Compare
Member
Author
|
Turned out there were a number of places we could unify. I also updated it to use Oklab color like in mne-qt-browser (better than CIELab). Okay to merge @wmvanvliet ? |
wmvanvliet
approved these changes
Aug 4, 2026
wmvanvliet
enabled auto-merge (squash)
August 4, 2026 13:44
larsoner
added a commit
to larsoner/mne-python
that referenced
this pull request
Aug 4, 2026
* upstream/main: (35 commits) Fix bug with coreg scaling (mne-tools#14132) MAINT: Update code credit (mne-tools#14131) Fix bugs with dark mode panels (mne-tools#14109) Improve code credit workflow (mne-tools#14120) Align _AbstractRenderer.tube with the PyVista implementation (mne-tools#14125) Assign instead of compare when marking explicit zeros in spatio_temporal_dist_adjacency (mne-tools#14124) MAINT: Update pre-commit hook versions (mne-tools#14122) MAINT: Update dependency specifiers (mne-tools#14121) fix: correct typo in comment (mne-tools#14117) [dependabot]: Bump the actions group with 2 updates (mne-tools#14123) Fix` read_raw_eyelink()` failure when recording blocks are empty or starting with empty values (mne-tools#13571) ENH: Add `event_key` parameter to `read_raw_egi` for MFF event metadata (mne-tools#14086) fix for scipy sparse deprecations (mne-tools#14118) Fix notch spectrum fit (mne-tools#14116) Speed up notch filter spectrum fit (mne-tools#14114) fix MNE-RT links and update roadmap (mne-tools#14096) Clarify `docdict["filter_length_notch"]` (mne-tools#14113) Refactor test_plot_alignment_basic() (mne-tools#13472) BUG: Cleanup cHPI filtering using smooth interpolation (mne-tools#14112) Use redirector app (mne-tools#14111) ... # Conflicts: # mne/tests/test_filter.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#14108 unsurfaced that we don't consistently or correctly honor dark mode in our subpanels. This PR fixes it:
In this PR gives
Don't think a test is needed for this one but could add if needed. Drafted changes with Opus 4.8.