private void accentComboBox_UpdateColor(object sender, EventArgs e)
        {
            Color backupColor = Color.FromArgb(AMLPalette.AccentColor.ToArgb());

            try
            {
                if (AMLPalette.PresetMap.ContainsKey(accentComboBox.Text))
                {
                    AMLPalette.AccentColor = AMLPalette.PresetMap[accentComboBox.Text];
                }
                else
                {
                    AMLPalette.AccentColor = AMLUtils.ColorFromHTML(accentComboBox.Text);
                }

                AMLPalette.RefreshTheme(BaseForm);
                BaseForm.ModManager.SyncConfigToDisk();
                AMLPalette.RefreshTheme(this);
            }
            catch
            {
                this.ShowBasicButton("Invalid color!", "OK", null, null);
                AMLPalette.AccentColor = backupColor;
            }
            UpdateColorBoxText();
        }
        public void SyncIndependentConfigFromDisk()
        {
            IndependentConfig independentConfig = null;

            try
            {
                independentConfig = JsonConvert.DeserializeObject <IndependentConfig>(File.ReadAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "AstroModLoader", "config.json")));
            }
            catch
            {
                independentConfig = null;
            }

            if (independentConfig != null)
            {
                if (!string.IsNullOrEmpty(independentConfig.AccentColor))
                {
                    try
                    {
                        AMLPalette.AccentColor = AMLUtils.ColorFromHTML(independentConfig.AccentColor);
                    }
                    catch { }
                }
                AMLPalette.CurrentTheme = independentConfig.Theme;
                AMLPalette.RefreshTheme(BaseForm);

                Platform = independentConfig.Platform;
                if (FirstRecordedIndependentConfigPlatform == PlatformType.Unknown)
                {
                    FirstRecordedIndependentConfigPlatform = independentConfig.Platform;
                }
                if (!string.IsNullOrEmpty(independentConfig.CustomBasePath))
                {
                    CustomBasePath = independentConfig.CustomBasePath;
                }
                if (!string.IsNullOrEmpty(independentConfig.PlayFabCustomID))
                {
                    PlayFabAPI.CustomID = independentConfig.PlayFabCustomID;
                }
                if (!string.IsNullOrEmpty(independentConfig.PlayFabToken))
                {
                    PlayFabAPI.Token = independentConfig.PlayFabToken;
                }
            }
        }