Scheme colors issue

When the editor’s VisualThemeType is set to VisualStudioCode or the Dark mode, the scheme colors that normally are recognized if the theme is “Custom” are not accurate. For instance, the color for the “number” style in the schemes file won’t appear correctly in the editor, nor will the color for the “idents” style. Perhaps other style names have a conflict as well. I remember an issue like this from the old QWhale product. I came to the conclusion that a scheme was inherited from the theme, but what do I know. :slight_smile:

The solution for me was to rename “idents” to “myidents” and “numbers” to “mynumbers” in the scheme editor which thankfully does a rename-refactor automatically. Problem solved. All of my colors are accurate while using the VisualStudioCode theme, including the nice hint-scrollbar. I love it.

Hi Roger,

You may have experienced this behavior as a theme overrides lexical style colors.
Under the hood, the theme style matches the lexical style by name.
If you look at the Visual Theme quick start project, you can see the following code, which overrides the lexical style for Reswords. Dark and Light visual themes have different constants for these colors. If you change the names of lexical styles from “numbers” to “mynumbers”, these styles stay as the parser defines them.

public class CustomVisualTheme : StandardVisualTheme
{
        protected override VisualThemeColors GetColors()
        {
            var colors = DarkVisualTheme.Instance.Colors.Clone();
            colors.Reswords = System.Drawing.Color.Red;
            colors.WindowBackground = System.Drawing.Color.FromArgb(40, 40, 40);
            return colors;
        }
}

Dmitry