save tokens by only replying code please fix my class error send back full script fixed

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ByteBreath
{
    internal class ThemeGenerator
    {
        public enum ThemeStyle
        {
            Classic,
            Vibrant,
            Epic,
            Neon,
            Pastel,
            DarkGlow,
            Oceanic,
            Sunset,
            Cyberpunk,
            Forest,
            Retro,
            Metallic,
            Candy,
            Space,
            Vintage,
            Aurora,
            PrismBurst,
            TechnoWave,
            SolarFlare,
            ElectricDream,
            MysticRainbow,
            TwilightPulse
        }

        public class ThemeGenerator
        {
            private readonly Random _rand;

            // Theme colors to hold last generated colors
            public Color LastMainStart { get; private set; } = Color.Empty;
            public Color LastMainEnd { get; private set; } = Color.Empty;
            public Color LastAccentsStart { get; private set; } = Color.Empty;
            public Color LastAccentsEnd { get; private set; } = Color.Empty;
            public Color LastTextColor { get; private set; } = Color.Empty;

            public ThemeGenerator(int? seed = null)
            {
                _rand = seed.HasValue ? new Random(seed.Value) : new Random();
            }

            public void GenerateRandomTheme(bool reapply = false)
            {
                if (!reapply || LastMainStart == Color.Empty)
                {
                    var styles = Enum.GetValues(typeof(ThemeStyle)).Cast<ThemeStyle>().ToList();

                    // Shuffle styles for random distribution
                    for (int i = styles.Count - 1; i > 0; i--)
                    {
                        int j = _rand.Next(i + 1);
                        (styles[i], styles[j]) = (styles[j], styles[i]);
                    }

                    var style = styles[0];

                    switch (style)
                    {
                        case ThemeStyle.Classic:
                            LastMainStart = RandomHueColor(15, 45, 0.6, 0.8, 0.6, 0.9);
                            LastMainEnd = RandomHueColor(35, 55, 0.7, 0.9, 0.7, 1.0);
                            LastAccentsStart = RandomHueColor(150, 180, 0.5, 0.7, 0.6, 0.9);
                            LastAccentsEnd = RandomHueColor(180, 210, 0.5, 0.7, 0.6, 0.9);
                            LastTextColor = ColorFromHSV(0, 0, 0.1);
                            break;

                        case ThemeStyle.Vibrant:
                            {
                                var bases = GenerateUniqueColorsDistinct(5, 0.8, 1.0, 0.7, 0.9);
                                LastMainStart = bases[0];
                                LastMainEnd = bases[1];
                                LastAccentsStart = bases[2];
                                LastAccentsEnd = bases[3];
                                LastTextColor = bases[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.Epic:
                            LastMainStart = RandomHueColor(0, 360, 0.75, 0.95, 0.1, 0.3);
                            LastMainEnd = RandomHueColor(0, 360, 0.75, 0.95, 0.4, 0.6);
                            LastAccentsStart = RandomHueColor(0, 360, 0.85, 1.0, 0.8, 1.0);
                            LastAccentsEnd = RandomHueColor(0, 360, 0.65, 0.85, 0.6, 0.85);
                            LastTextColor = Color.WhiteSmoke;
                            break;

                        case ThemeStyle.Neon:
                            LastMainStart = Color.Black;
                            LastMainEnd = ColorFromHSV(SafeRandomRange(_rand, 280, 320), 0.85, 0.3);
                            LastAccentsStart = ColorFromHSV(SafeRandomRange(_rand, 150, 190), 0.95, 0.9);
                            LastAccentsEnd = ColorFromHSV(SafeRandomRange(_rand, 200, 240), 0.9, 0.8);
                            LastTextColor = Color.White;
                            break;

                        case ThemeStyle.Pastel:
                            {
                                var pastels = GenerateUniqueColorsDistinct(5, 0.25, 0.4, 0.85, 1.0);
                                LastMainStart = pastels[0];
                                LastMainEnd = pastels[1];
                                LastAccentsStart = pastels[2];
                                LastAccentsEnd = pastels[3];
                                LastTextColor = pastels[4].GetBrightness() > 0.7 ? Color.FromArgb(255, 50, 50, 50) : Color.WhiteSmoke;
                            }
                            break;

                        case ThemeStyle.DarkGlow:
                            {
                                var darks = GenerateUniqueColorsDistinct(4, 0.7, 1.0, 0.05, 0.25);
                                LastMainStart = darks[0];
                                LastMainEnd = darks[1];
                                LastAccentsStart = darks[2];
                                LastAccentsEnd = darks[3];
                                LastTextColor = GenerateUniqueLightColorExcluding(darks);
                            }
                            break;

                        case ThemeStyle.Oceanic:
                            {
                                var ocean = GenerateUniqueColorsDistinct(5, 0.6, 0.85, 0.4, 0.7);
                                for (int i = 0; i < ocean.Count; i++)
                                {
                                    double h, s, v;
                                    ColorToHSV(ocean[i], out h, out s, out v);
                                    h = (h + 160) % 360;
                                    ocean[i] = ColorFromHSV(h, s, v);
                                }
                                LastMainStart = ocean[0];
                                LastMainEnd = ocean[1];
                                LastAccentsStart = ocean[2];
                                LastAccentsEnd = ocean[3];
                                LastTextColor = ocean[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.Sunset:
                            {
                                var sunset = GenerateUniqueColorsDistinct(5, 0.6, 0.9, 0.4, 0.7);
                                for (int i = 0; i < sunset.Count; i++)
                                {
                                    double h, s, v;
                                    ColorToHSV(sunset[i], out h, out s, out v);
                                    h = (h + 35) % 60 + 10;
                                    sunset[i] = ColorFromHSV(h, s, v);
                                }
                                LastMainStart = sunset[0];
                                LastMainEnd = sunset[1];
                                LastAccentsStart = sunset[2];
                                LastAccentsEnd = sunset[3];
                                LastTextColor = sunset[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.Cyberpunk:
                            {
                                var cyber = GenerateUniqueColorsDistinct(5, 0.75, 1.0, 0.05, 0.35);
                                double[] cyberHueTargets = { 270, 300, 210, 240, 280 };
                                for (int i = 0; i < cyberHueTargets.Length; i++)
                                {
                                    if (i < cyber.Count)
                                    {
                                        double h, s, v;
                                        ColorToHSV(cyber[i], out h, out s, out v);
                                        h = cyberHueTargets[i];
                                        cyber[i] = ColorFromHSV(h, s, v);
                                    }
                                }
                                LastMainStart = cyber[0];
                                LastMainEnd = cyber[1];
                                LastAccentsStart = cyber[2];
                                LastAccentsEnd = cyber[3];
                                LastTextColor = cyber[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.Forest:
                            {
                                var forest = GenerateUniqueColorsDistinct(5, 0.5, 0.8, 0.3, 0.55);
                                for (int i = 0; i < forest.Count; i++)
                                {
                                    double h, s, v;
                                    ColorToHSV(forest[i], out h, out s, out v);
                                    h = (h + 90) % 140 + 40;
                                    forest[i] = ColorFromHSV(h, s, v);
                                }
                                LastMainStart = forest[0];
                                LastMainEnd = forest[1];
                                LastAccentsStart = forest[2];
                                LastAccentsEnd = forest[3];
                                LastTextColor = forest[4].GetBrightness() > 0.7 ? Color.FromArgb(255, 20, 20, 20) : Color.White;
                            }
                            break;

                        case ThemeStyle.Retro:
                            {
                                var retro = GenerateUniqueColorsDistinct(5, 0.4, 0.7, 0.3, 0.6);
                                double[] retroHueTargets = { 290, 20, 40, 30, 350 };
                                for (int i = 0; i < retroHueTargets.Length; i++)
                                {
                                    if (i < retro.Count)
                                    {
                                        double h, s, v;
                                        ColorToHSV(retro[i], out h, out s, out v);
                                        h = retroHueTargets[i];
                                        retro[i] = ColorFromHSV(h, s, v);
                                    }
                                }
                                LastMainStart = retro[0];
                                LastMainEnd = retro[1];
                                LastAccentsStart = retro[2];
                                LastAccentsEnd = retro[3];
                                LastTextColor = retro[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.Metallic:
                            {
                                var metallic = GenerateUniqueColorsDistinct(5, 0.05, 0.15, 0.3, 0.55);
                                for (int i = 0; i < metallic.Count; i++)
                                {
                                    double h, s, v;
                                    ColorToHSV(metallic[i], out h, out s, out v);
                                    s *= 0.1;
                                    metallic[i] = ColorFromHSV(h, s, v);
                                }
                                LastMainStart = metallic[0];
                                LastMainEnd = metallic[1];
                                LastAccentsStart = metallic[2];
                                LastAccentsEnd = metallic[3];
                                LastTextColor = metallic[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.Candy:
                            {
                                var candy = GenerateUniqueColorsDistinct(5, 0.7, 0.95, 0.7, 1.0);
                                double[] candyHueTargets = { 320, 350, 330, 310, 300 };
                                for (int i = 0; i < candyHueTargets.Length; i++)
                                {
                                    if (i < candy.Count)
                                    {
                                        double h, s, v;
                                        ColorToHSV(candy[i], out h, out s, out v);
                                        h = candyHueTargets[i];
                                        candy[i] = ColorFromHSV(h, s, v);
                                    }
                                }
                                LastMainStart = candy[0];
                                LastMainEnd = candy[1];
                                LastAccentsStart = candy[2];
                                LastAccentsEnd = candy[3];
                                LastTextColor = candy[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.Space:
                            {
                                var space = GenerateUniqueColorsDistinct(5, 0.7, 0.9, 0.05, 0.35);
                                double[] spaceHueTargets = { 240, 260, 250, 220, 280 };
                                for (int i = 0; i < spaceHueTargets.Length; i++)
                                {
                                    if (i < space.Count)
                                    {
                                        double h, s, v;
                                        ColorToHSV(space[i], out h, out s, out v);
                                        h = spaceHueTargets[i];
                                        space[i] = ColorFromHSV(h, s, v);
                                    }
                                }
                                LastMainStart = space[0];
                                LastMainEnd = space[1];
                                LastAccentsStart = space[2];
                                LastAccentsEnd = space[3];
                                LastTextColor = space[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.Vintage:
                            {
                                var vintage = GenerateUniqueColorsDistinct(5, 0.4, 0.65, 0.3, 0.55);
                                double[] vintageHueTargets = { 40, 50, 30, 20, 10 };
                                for (int i = 0; i < vintageHueTargets.Length; i++)
                                {
                                    if (i < vintage.Count)
                                    {
                                        double h, s, v;
                                        ColorToHSV(vintage[i], out h, out s, out v);
                                        h = vintageHueTargets[i];
                                        vintage[i] = ColorFromHSV(h, s, v);
                                    }
                                }
                                LastMainStart = vintage[0];
                                LastMainEnd = vintage[1];
                                LastAccentsStart = vintage[2];
                                LastAccentsEnd = vintage[3];
                                LastTextColor = vintage[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.Aurora:
                            {
                                var aurora = GenerateUniqueColorsDistinct(5, 0.7, 1.0, 0.25, 0.55);
                                double[] auroraHueTargets = { 150, 180, 130, 220, 200 };
                                for (int i = 0; i < auroraHueTargets.Length; i++)
                                {
                                    if (i < aurora.Count)
                                    {
                                        double h, s, v;
                                        ColorToHSV(aurora[i], out h, out s, out v);
                                        h = auroraHueTargets[i];
                                        aurora[i] = ColorFromHSV(h, s, v);
                                    }
                                }
                                LastMainStart = aurora[0];
                                LastMainEnd = aurora[1];
                                LastAccentsStart = aurora[2];
                                LastAccentsEnd = aurora[3];
                                LastTextColor = aurora[4].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.PrismBurst:
                            {
                                var baseColors = GenerateUniqueColorsDistinct(5, 0.8, 1.0, 0.7, 1.0);
                                LastMainStart = baseColors[0];
                                LastMainEnd = baseColors[1];
                                LastAccentsStart = baseColors[2];
                                LastAccentsEnd = baseColors[3];
                                LastTextColor = baseColors[4].GetBrightness() < 0.4 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.TechnoWave:
                            {
                                LastMainStart = ColorFromHSV(_rand.Next(200, 240), 0.95, 0.1);
                                LastMainEnd = ColorFromHSV(_rand.Next(220, 260), 0.95, 0.3);
                                LastAccentsStart = ColorFromHSV(_rand.Next(280, 320), 0.9, 0.8);
                                LastAccentsEnd = ColorFromHSV(_rand.Next(300, 340), 0.9, 0.9);
                                LastTextColor = Color.White;
                            }
                            break;

                        case ThemeStyle.SolarFlare:
                            {
                                LastMainStart = ColorFromHSV(_rand.Next(10, 40), 0.9, 0.3);
                                LastMainEnd = ColorFromHSV(_rand.Next(20, 50), 0.9, 0.5);
                                LastAccentsStart = ColorFromHSV(_rand.Next(30, 60), 1.0, 0.95);
                                LastAccentsEnd = ColorFromHSV(_rand.Next(15, 45), 1.0, 0.85);
                                LastTextColor = Color.FromArgb(255, 30, 30, 30);
                            }
                            break;

                        case ThemeStyle.ElectricDream:
                            {
                                var colors = GenerateUniqueColorsDistinct(5, 0.5, 0.85, 0.6, 0.85);
                                double[] targetHues = { 280, 190, 320, 350, 300 };
                                for (int i = 0; i < targetHues.Length; i++)
                                {
                                    if (i < colors.Count)
                                    {
                                        double h, s, v;
                                        ColorToHSV(colors[i], out h, out s, out v);
                                        h = targetHues[i];
                                        colors[i] = ColorFromHSV(h, s, v);
                                    }
                                }
                                LastMainStart = colors[0];
                                LastMainEnd = colors[1];
                                LastAccentsStart = colors[2];
                                LastAccentsEnd = colors[3];
                                LastTextColor = colors[4].GetBrightness() < 0.5 ? Color.WhiteSmoke : Color.Black;
                            }
                            break;

                        case ThemeStyle.MysticRainbow:
                            {
                                LastMainStart = ColorFromHSV(_rand.Next(0, 360), 0.2, 0.15);
                                LastMainEnd = ColorFromHSV((_rand.Next(0, 360) + 180) % 360, 0.3, 0.25);
                                var accents = GenerateUniqueColorsDistinct(3, 0.85, 1.0, 0.8, 1.0);
                                LastAccentsStart = accents[0];
                                LastAccentsEnd = accents[1];
                                LastTextColor = accents[2].GetBrightness() < 0.5 ? Color.White : Color.Black;
                            }
                            break;

                        case ThemeStyle.TwilightPulse:
                            {
                                LastMainStart = ColorFromHSV(_rand.Next(250, 280), 0.6, 0.45);
                                LastMainEnd = ColorFromHSV(_rand.Next(230, 260), 0.65, 0.6);
                                LastAccentsStart = ColorFromHSV(_rand.Next(310, 350), 0.9, 0.95);
                                LastAccentsEnd = ColorFromHSV(_rand.Next(270, 310), 0.9, 0.8);
                                LastTextColor = Color.FromArgb(255, 240, 240, 250);
                            }
                            break;
                    }
                }

                // Instead of your Theme method you can either return or have public properties set
                // Example:
                // Theme(LastMainStart, LastMainEnd, LastAccentsStart, LastAccentsEnd, LastTextColor);
            }


            #region Helper Methods

            private Color RandomHueColor(double minHue, double maxHue, double minSaturation, double maxSaturation, double minValue, double maxValue)
            {
                double h = RandomRange(_rand, minHue, maxHue);
                double s = RandomRange(_rand, minSaturation, maxSaturation);
                double v = RandomRange(_rand, minValue, maxValue);
                return ColorFromHSV(h, s, v);
            }

            private static double RandomRange(Random rand, double min, double max)
            {
                return min + rand.NextDouble() * (max - min);
            }

            private static float SafeRandomRange(Random rand, int min, int max)
            {
                return (float)(rand.Next(min, max));
            }

            private List<Color> GenerateUniqueColorsDistinct(int count, double minSaturation, double maxSaturation, double minValue, double maxValue)
            {
                var colors = new List<Color>();
                int attempts = 0;
                while (colors.Count < count && attempts < 1000)
                {
                    var c = RandomHueColor(0, 360, minSaturation, maxSaturation, minValue, maxValue);
                    if (!colors.Any(existing => ColorDistance(existing, c) < 30))
                    {
                        colors.Add(c);
                    }
                    attempts++;
                }
                if (colors.Count < count)
                {
                    // Fill remaining if distinct colors not found sufficiently
                    while (colors.Count < count)
                        colors.Add(RandomHueColor(0, 360, minSaturation, maxSaturation, minValue, maxValue));
                }
                return colors;
            }

            private static double ColorDistance(Color c1, Color c2)
            {
                int rDiff = c1.R - c2.R;
                int gDiff = c1.G - c2.G;
                int bDiff = c1.B - c2.B;
                return Math.Sqrt(rDiff * rDiff + gDiff * gDiff + bDiff * bDiff);
            }

            private Color GenerateUniqueLightColorExcluding(List<Color> exclude)
            {
                int attempts = 0;
                while (attempts < 1000)
                {
                    Color c = RandomHueColor(0, 360, 0.8, 1.0, 0.8, 1.0);
                    if (c.GetBrightness() > 0.7 && exclude.All(ex => ColorDistance(ex, c) > 50))
                        return c;
                    attempts++;
                }
                return Color.LightGray;
            }

            private static void ColorToHSV(Color color, out double hue, out double saturation, out double value)
            {
                int max = Math.Max(Math.Max(color.R, color.G), color.B);
                int min = Math.Min(Math.Min(color.R, color.G), color.B);

                hue = color.GetHue();
                saturation = max == 0 ? 0 : 1d - (1d * min / max);
                value = max / 255d;
            }

            private static Color ColorFromHSV(double hue, double saturation, double value)
            {
                int hi = Convert.ToInt32(Math.Floor(hue / 60)) % 6;
                double f = hue / 60 - Math.Floor(hue / 60);

                value = value * 255;
                int v = Convert.ToInt32(value);
                int p = Convert.ToInt32(value * (1 - saturation));
                int q = Convert.ToInt32(value * (1 - f * saturation));
                int t = Convert.ToInt32(value * (1 - (1 - f) * saturation));

                switch (hi)
                {
                    case 0:
                        return Color.FromArgb(255, v, t, p);
                    case 1:
                        return Color.FromArgb(255, q, v, p);
                    case 2:
                        return Color.FromArgb(255, p, v, t);
                    case 3:
                        return Color.FromArgb(255, p, q, v);
                    case 4:
                        return Color.FromArgb(255, t, p, v);
                    default:
                        return Color.FromArgb(255, v, p, q);
                }
            }
        }
    }
}
#endregion

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error (active)	CS0542	'ThemeGenerator': member names cannot be the same as their enclosing type	ByteBreath	C:\Users\DjZaN\source\repos\Byte_Breath\ByteBreath\ThemeGenerator.cs	37