public static bool FitsIdeTheme(this EditorTheme editorTheme, Theme theme)
 {
     Components.HslColor bgColor;
     editorTheme.TryGetColor(EditorThemeColors.Background, out bgColor);
     if (theme == Theme.Dark)
     {
         return(bgColor.L <= 0.5);
     }
     return(bgColor.L > 0.5);
 }
        public static HslColor GetColorFromScope(EditorTheme style, string scope, string key)
        {
            HslColor result;

            if (!style.TryGetColor(scope, key, out result))
            {
                DefaultColorStyle.TryGetColor(scope, key, out result);
            }
            return(result);
        }
        internal static ChunkStyle GetChunkStyle(EditorTheme style, string key)
        {
            HslColor result;

            if (!style.TryGetColor(key, out result))
            {
                DefaultColorStyle.TryGetColor(key, out result);
            }
            return(new ChunkStyle()
            {
                Foreground = result
            });
        }