[Theme] Some languages have no supported dark mode.

SyntaxEditor for WPF Forum

Posted 9 months ago by Ethem Acar
Version: 23.1.3
Avatar

Hi,

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

Example:

https://snipboard.io/v6oSqB.jpg

In Code Writer they look better:

https://snipboard.io/xG5tJp.jpg

Comments (5)

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

Hello,

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
Avatar

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

https://github.com/EthemAcar-Dev/ActiProDarkThemeSyntaxEditor

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.

Before:
https://snipboard.io/M7l9eh.jpg

After (50% brighter code generated colors):
https://snipboard.io/aLfg9w.jpg

[Modified 9 months ago]

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

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
Avatar

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

UseChromaticAdaptation

== 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
Avatar

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.