SourceCodeSyntaxHighlight icon indicating copy to clipboard operation
SourceCodeSyntaxHighlight copied to clipboard

macOS Ventura 13.0 inverted theme with RTF engine

Open Altair-Bueno opened this issue 2 years ago • 16 comments

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

image

Dark mode disabled

image

Dark mode enabled

image

Additional information

  • I've tried Python, Rust and Yaml sources
  • HTML engine appears to be working fine
image

System info

  • macOS Ventura 13.0
  • Syntax Highlight 2.1.15 (64)

Altair-Bueno avatar Oct 25 '22 09:10 Altair-Bueno

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/

sbarex avatar Oct 25 '22 20:10 sbarex

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 😉

ParzivalExe avatar Oct 30 '22 20:10 ParzivalExe

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.

sbarex avatar Oct 30 '22 21:10 sbarex

Perhaps we should switch the default to HTML until we figure out a fix?

cpsauer avatar Feb 04 '23 05:02 cpsauer

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

Altair-Bueno avatar Feb 04 '23 09:02 Altair-Bueno

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:

image

With SyntaxHighlight, RTF engine:

image

With SyntaxHighlight, HTML engine:

image

guillemparrado avatar Apr 05 '23 16:04 guillemparrado

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).

Screenshot 2023-04-06 at 10 47 50 AM

simioni avatar Apr 06 '23 14:04 simioni

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!

MatisseHack avatar Apr 06 '23 19:04 MatisseHack

Does someone have an inverse light mode scheme they can share?

learn2reid avatar Jun 17 '23 18:06 learn2reid

@learn2reid you select the theme right there, click on the filter and select dark content like this

Screenshot 2023-06-21 at 17 09 24

EddieLukeAtmey avatar Jun 21 '23 10:06 EddieLukeAtmey

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.

khurshid-alam avatar Aug 04 '24 22:08 khurshid-alam

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.

sbarex avatar Aug 06 '24 07:08 sbarex