feat(tui): highlight hex codes with the color#9016
feat(tui): highlight hex codes with the color#9016jettptacek wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
|
This feature probably benefits from being configurable. I don't know if that is what people want though. I could see this being part of a set of non-theme colorization options that users could set what they want Also, I'm monkey patching treeSitterClient.highlightOnce to even get this to work. I think an improvement to OpenTUI might be required for a cleaner approach |
|
I created a pull request for opentui anomalyco/opentui#568 so I can change this implementation to use a callback feature instead of monkey patching Here's my little opentui example ColorCodeExample.mp4 |
What does this PR do?
Highlights hex color codes in markdown content with their actual color as the background. The foreground text automatically switches between black and white based on luminance for readability.
Supports:
Colors with alpha are blended against the theme background, and update correctly when switching themes.
Closes #2586
How did you verify your code works?
Manual verification in Wezterm and Powershell on Windows
opencode_colorcode.mp4