[Theme] Some languages have no supported dark mode.

SyntaxEditor for WPF Forum

Posted 9 months ago by Ethem Acar
Version: 23.1.3


Some languages like SQL/PHP and maybe more don't have supported dark mode.



In Code Writer they look better:


Comments (5)

Posted 9 months ago by Actipro Software Support - Cleveland, OH, USA


Right now our SyntaxEditor language definitions can only specify a single color for each highlighting style.  Those single colors are set up with the intention for light themes.

The last section in this documentation topic discusses how you can support dark themes with alternate highlighting style colors.  Our samples show some dark theme highlighting styles for a number of popular languages, but they may not cover SQL or PHP at the moment.  You could add entries to the Dark.vssettings file for those languages to have them work in our samples as well.  We know this is an area that needs improvement since it's currently loading a Visual Studio settings file (which is somewhat convoluted in how colors are specified) to override the light theme highlighting style values.  We have a TODO item to improve dark theme support, and I'll log this thread with that item.

Actipro Software Support

Posted 9 months ago by Ethem Acar

Yeah to make it easier for me I spend some couple hours to make this editor:


Using some online found color brightness, I automated the process nice enough to make all programming languages readable in dark mode.

This kind of logic / editor could be implemented in Actipro language designer, but for now this is good enough.


After (50% brighter code generated colors):

[Modified 9 months ago]

Posted 9 months ago by Actipro Software Support - Cleveland, OH, USA

Thanks for sharing your work.  That look like a neat concept.  We also have logic here that can perform chromatic adaptation of colors for dark themes, and perhaps having an option to automatically use that would be something we could do.

Actipro Software Support

Posted 9 months ago by Ethem Acar

Yeah that could work for people that don't want the trouble of setting up every color by hand.


== True
---------- Sets colors for dark themes based on ChromaticAdaptation.
---------- Ignores vssettings file.

== False
---------- Uses vssettings file
---------- Use vssettings editor like mine (ActiProDarkThemeSyntaxEditor) to define every property color by hand for dark themes.

Posted 4 months ago by Actipro Software Support - Cleveland, OH, USA

Quick update... the next release of SyntaxEditor will include native support for light/dark themes and all Actipro-provided languages now define colors that are appropriate for light and dark themes.  For languages that don't (yet) define dark colors, we currently have a pre-defined mapping of many commonly-used light colors and their dark equivalents.  We had high hopes for using our internal logic for  chromatic adaption to dark themes, but the initial results were not very appealing.

For this initial update, we'll keep with the more simplistic mapping. Once we have more feedback on the upgrade, we'll explore other options for making this more extensible.

Please check out our announcement post if you'd like to validate the new functionality in a preview release and provide feedback before it is finalized.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.