<commit_before>using UnityEngine;
using UnityEditor;

public static class EditorGUIStyleExtensions {
  public static bool IsProSkin {
    get {
      GUISkin tmp = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector);
      Color textColor = tmp.label.normal.textColor;
      return textColor != Color.black;
    }
  }

  public static GUIStyle BaseTextColor(this GUIStyle style, Color normalSkin, Color proSkin) {
    style.normal.textColor =
      style.active.textColor =
      style.hover.textColor =
      style.focused.textColor =
      style.onNormal.textColor =
      style.onActive.textColor =
      style.onHover.textColor =
      style.onFocused.textColor =
        IsProSkin ? proSkin : normalSkin;
    return style;
  }
}<commit_msg>Helper for facilitating seamless switching when the user switches skins.<commit_after>using UnityEngine;
using UnityEditor;

public static class EditorGUIStyleExtensions {
  public static bool IsProSkin {
    get {
      GUISkin tmp = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector);
      Color textColor = tmp.label.normal.textColor;
      return textColor != Color.black;
    }
  }

  private static bool wasProSkin = EditorGUIUtility.isProSkin;
  public static void InvalidateOnSkinChange(GUIStyle[] styles) {
    if(EditorGUIUtility.isProSkin != wasProSkin) {
      wasProSkin = EditorGUIUtility.isProSkin;
      for(int i = 0; i < styles.Length; i++) {
        styles[i] = null;
      }
    }
  }

  public static GUIStyle BaseTextColor(this GUIStyle style, Color normalSkin, Color proSkin) {
    style.normal.textColor =
      style.active.textColor =
      style.hover.textColor =
      style.focused.textColor =
      style.onNormal.textColor =
      style.onActive.textColor =
      style.onHover.textColor =
      style.onFocused.textColor =
        IsProSkin ? proSkin : normalSkin;
    return style;
  }
}
{'fraction_non_alphanumeric': 0.08284339925173703, 'fraction_numerical': 0.0005344735435595938, 'mean_word_length': 3.1415929203539825, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7116829', 'n_tokens_mistral': 584, 'n_tokens_neox': 578, 'n_words': 121}