SourceCodeSyntaxHighlight
SourceCodeSyntaxHighlight copied to clipboard
macOS Ventura 13.0 inverted theme with RTF engine
Summary
RTF engine does not work properly on macOS Ventura
Expected behaviour
Dark colorscheme on dark theme, light colorscheme on light theme
Current behaviour
Dark colorscheme on light theme, light colorscheme on dark theme
Screenshots
SyntaxHighlight config

Dark mode disabled

Dark mode enabled

Additional information
- I've tried Python, Rust and Yaml sources
- HTML engine appears to be working fine

System info
- macOS Ventura 13.0
- Syntax Highlight 2.1.15 (64)
The colors are not inverted. But on dark mode Venura blend the window background color with the rtf colors! For now I do not have a solution. Please use the html engine.
see these links: https://eclecticlight.co/2018/11/14/making-documents-look-good-in-both-appearance-modes/ https://eclecticlight.co/2018/12/06/textedit-1-14-not-the-dark-mode-youd-expect/ https://eclecticlight.co/2018/12/10/rendering-rich-text-in-dark-mode/
I have the same Problem (which wouldn't be much news). I am writing this comment mainly because it is not simply: If you have Ventura, you have this problem: A friend uses Syntax Highlight with Ventura and has the desired effect (dark-mode shows dark-mode and light-mode shows light-mode). He also uses Apple-Silicon like me, so that is also not the difference.
I have no idea what the difference between both of your systems could be. We even went so far as to AirDrop the App from his Device right onto mine and it still didn't work for me.
Well, I will probably use HTML in the meantime 😉
If you activate the debug mode, on the desktop a colorize.rtf file will be created. If it is opened in textedit it will have the same problem. To see it normally in textedit you have to deactivate the option "use dark background for windows" on the view menu.
Apple unfortunately does not document rtf syntax for the color styles for light and dark themes.
Perhaps we should switch the default to HTML until we figure out a fix?
Totally forgot about this issue. HTML engine gave me zero issues for the last 3 months. Switching the default engine temporally looks like a good patch to me
But the HTML engine doesn't render embedded in finder, you need to actually open QuickLook to see what's inside.
A Finder snapshot without SyntaxHighlight:

With SyntaxHighlight, RTF engine:

With SyntaxHighlight, HTML engine:

The HTML animation is also a bit wonky (at least on Ventura 13.3 on M1 Pro). The quick-look preview starts out as white, and the HTML rendering engine only gets to paint it dark a couple frames after the animation has already started. It doesn't look smooth.
What worked for me to fix the colors on the RTS engine was setting a light theme for the dark color scheme of Syntax Highlighter (basically inverting the colors in the preferences).

What worked for me to fix the colors on the RTS engine was setting a light theme for the dark color scheme of Syntax Highlighter (basically inverting the colors in the preferences).
Oh, that worked! Setting a dark color scheme in light mode wasn't enough, but setting a light color scheme in dark mode seems to have fixed it!
Does someone have an inverse light mode scheme they can share?
@learn2reid you select the theme right there, click on the filter and select dark content like this
It didn't exactly work for me. Even though it fixes the color, it is not exactly same like in HTML rendering. In Raycast it just shows wrong color with RTF. And If you press ⌘ + Y to quick look, it opens preview in same wrong color.
This is very troubling issue.
The RTF engine was useful when the HTML view was plagued by a series of bugs, but with the latest operating system updates you can safely use the HTML engine.