public virtual GameProfileCustomItem loadColorPresetCustomItem(GameProfileCustomItem customItem, AppColorPreset preset)
 {
     foreach (KeyValuePair <string, string> pair in preset.data)
     {
         customItem.SetCustomColor(pair.Key, AppColors.GetColor(pair.Value));
     }
     return(customItem);
 }
    public virtual GameProfileCustomItem updateColorPresetObject(
        GameProfileCustomItem profileCustomItem, GameObject go, AppColorPreset preset)
    {
        if (preset == null)
        {
            return(profileCustomItem);
        }

        Dictionary <string, Color> colors = new Dictionary <string, Color>();

        foreach (KeyValuePair <string, string> pair in preset.data)
        {
            colors.Add(pair.Key, AppColors.GetColor(pair.Value));
        }

        if (colors.Count > 0)
        {
            return(updateColorPresetObject(profileCustomItem, go, preset.type, colors));
        }

        return(profileCustomItem);
    }