[209_16] Fixes dark mode syntax highlighting for python#2961
Merged
wumoin merged 3 commits intoMoganLab:mainfrom Mar 10, 2026
Merged
Conversation
…d english translations of hex color codes in python-lang.scm
Contributor
|
@1sh-repalto , hello I was already working on this issue … |
Contributor
Author
|
Hi @git-lakshy , I asked in the comment section of the issue if you're still working on it. Since I got no reply for a day, I took this issue. You can still open a PR and we'll let the rest for maintainers to decide. |
Contributor
|
That would be inefficient, your fix seems to be working just fine. |
Contributor
Author
|
My apologies, I didn't intend to overlap with your work. I appreciate your contributions and wish you the best with other issues. |
wumoin
approved these changes
Mar 10, 2026
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.
Fixes #2553
In the dark theme, the syntax highlighting for languages such as Python is also difficult to see.
Summary
python-lang.scm) to use lighter color variants that are clearly legible on both light and dark backgrounds.focus-colorin (dark.ts) from (#3A86FF) to (#3A86FF33) so that the active line marker no longer completely blocks text when a dark theme is active.Developer Document:
devel/209_16.mdIssues Found
Changes
In
TeXmacs/plugins/python/progs/code/python-lang.scm:define-preferenceshex values and named color mappings to use bright, pastel versions of the original colors.In
TeXmacs/packages/themes/dark/dark.ts:focus-colorassignment with an 8-character hex code specifying ~20% opacity.How to Test
Document -> Theme -> Dark).Insert -> Session -> Python) or write Python code block.focus-color) acts as a translucent overlay rather than an opaque block.Before (Dark Theme)
After (Dark Theme)
Before (Light Theme)
After (Light Theme)
Before (Active Code Line)
After (Active Code Line)