Colors wash out when I paste an exported RTF.

I use Keynote to teach programming, which will involve bringing in code snippets. I like them to be syntax highlighted, and to achieve it, I wrote a script to generate RTF that can be pasted into Keynote. The generated RTF's colors and the ones rendered by Keynote after pasting differ. From what I've seen, it's the case that colors look a bit washed out after being pasted. Is there some solution for this? Thanks!

MacBook Pro 13″, macOS 10.15

Posted on Sep 24, 2020 12:51 PM

Reply

Similar questions

3 replies

Sep 24, 2020 8:18 PM in response to VikingOSX

Thanks for the response! Yes, I later realized that VS Code has a built in functionality to copy the syntax highlighting (with color theme), but the problem remains the same. Those colors get washed out. BG getting copied is ok, I just set it to none after pasting in Keynote. My next move to solve this one would be to check the color difference and see if there's a pattern, and may be give it that offset, so that I get the color that I want. I just wish Keynote comes with the support built into it.

Sep 24, 2020 3:52 PM in response to csbnikhil

RTF is a hard road to travel for stylized text from code, and attempting any color management too. I use the Textastic programmers editor on Mac which offers two Edit menu choices: 1) copy as stylized text, and 2) copy as stylized HTML. Textastic also allows you to use TextMate Themes to customize the syntax highlighting of the code. The application is in the Mac App Store, and there is a free Trial option on the developer's site. It copies the stylized text into Keynote v10.2, but not the editor's background behind that text.


Microsoft's free Visual Studio Code will also copy and paste into Keynote with identical syntax highlighting, but it also carries the background color behind the original syntax highlighted code into Keynote. In my case Keynote v10.2 deposited the code in a Text box, and the black background of the Keynote slide was darker than the dark background of the VSC window.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Colors wash out when I paste an exported RTF.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.