public static void setCurrentPaletteCopy()
 {
     CurrentPalette = new Palette(availablePalettes[IndCurrentPalette]);
 }
        public static void initializePaletteManager()
        {
            Palette Spectrum = new Palette(
                "Spectrum",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0, 1, .5m),
                new PaletteColor(1, 360, 1, .5m)
            },
                true
                );

            Palette Earth = new Palette(
                "Earth",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0xFF, 0xFF, 0xFF),
                new PaletteColor(0.5m, 0xFF, 0xFF * 0.8m, 0),
                new PaletteColor(1, 0xFF * 0.53m, 0xFF * 0.12m, 0xFF * 0.075m)
            },
                false
                );

            Palette EarthAndSky = new Palette(
                "EarthAndSky",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0xFF, 0xFF, 0xFF),
                new PaletteColor(.17m, 0xFF, 0xFF * 0.8m, 0),
                new PaletteColor(.34m, 0xFF * 0.53m, 0xFF * 0.12m, 0xFF * 0.075m),
                new PaletteColor(.66m, 0, 0, 0xFF * 0.6m),
                new PaletteColor(.83m, 0, 0xFF * 0.4m, 0xFF),
                new PaletteColor(1, 0xFF, 0xFF, 0xFF)
            },
                false
                );

            Palette HotAndCold = new Palette(
                "HotAndCold",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0xFF, 0xFF, 0xFF),
                new PaletteColor(.17m, 0, 0xFF * 0.4m, 0xFF),
                new PaletteColor(.5m, 0xFF * 0.2m, 0xFF * 0.2m, 0xFF * 0.2m),
                new PaletteColor(.83m, 0xFF, 0, 0xFF * 0.8m),
                new PaletteColor(1, 0xFF, 0xFF, 0xFF)
            },
                false
                );

            Palette Forest = new Palette(
                "Forest",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 46, .43m, .21m),
                new PaletteColor(.33m, 32, .26m, .54m),
                new PaletteColor(.66m, 223, .7m, .24m),
                new PaletteColor(1, 46, .43m, .21m)
            },
                true
                );

            Palette Seashore = new Palette(
                "SeaShore",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0xFF * 0.791m, 0xFF * 0.996m, 0xFF * 0.763m),
                new PaletteColor(.17m, 0xFF * 0.897m, 0xFF * 0.895m, 0xFF * 0.656m),
                new PaletteColor(.34m, 0xFF * 0.947m, 0xFF * 0.316m, 0xFF * 0.127m),
                new PaletteColor(.5m, 0xFF * 0.518m, 0xFF * 0.111m, 0xFF * 0.0917m),
                new PaletteColor(.66m, 0xFF * 0.0198m, 0xFF * 0.456m, 0xFF * 0.684m),
                new PaletteColor(.83m, 0xFF * 0.538m, 0xFF * 0.826m, 0xFF * 0.818m),
                new PaletteColor(1, 0xFF * 0.791m, 0xFF * 0.996m, 0xFF * 0.763m)
            },
                false
                );

            Palette Fire = new Palette(
                "Fire",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0, 0, 0),
                new PaletteColor(.15m, 0xFF, 0, 0),
                new PaletteColor(.85m, 0xFF, 0xFF, 0),
                new PaletteColor(1, 0xFF, 0xFF, 0xFF)
            },
                false
                );

            Palette CyclicFire = new Palette(
                "CyclicFire",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0, 0, 0),
                new PaletteColor(.2m, 0xFF, 0, 0),
                new PaletteColor(.4m, 0xFF, 0xFF, 0),
                new PaletteColor(.5m, 0xFF, 0xFF, 0xFF),
                new PaletteColor(.6m, 0xFF, 0xFF, 0),
                new PaletteColor(.8m, 0xFF, 0, 0),
                new PaletteColor(1, 0, 0, 0)
            },
                false
                );

            Palette RedCyan = new Palette(
                "RedCyan",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0xFF, 0, 0),
                new PaletteColor(0.5m, 0, 0xFF, 0xFF),
                new PaletteColor(1, 0xFF, 0, 0),
            },
                false
                );

            Palette BlueGold = new Palette(
                "BlueGold",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0xFF * 0.1m, 0xFF * 0.1m, 0xFF),
                new PaletteColor(0.5m, 0xFF, 0xFF * 0.6m, 0),
                new PaletteColor(1, 0xFF * 0.1m, 0xFF * 0.1m, 0xFF),
            },
                false
                );

            Palette GrayScale = new Palette(
                "GrayScale",
                new List <PaletteColor>()
            {
                new PaletteColor(1, 0xFF, 0xFF, 0xFF),
                new PaletteColor(0, 0, 0, 0)
            },
                false
                );

            Palette CyclicGrayScale = new Palette(
                "CyclicGrayScale",
                new List <PaletteColor>()
            {
                new PaletteColor(0, 0, 0, 0),
                new PaletteColor(0.5m, 0xFF, 0xFF, 0xFF),
                new PaletteColor(1, 0, 0, 0),
            },
                false
                );

            Random  r      = new Random();
            Palette Random = new Palette(
                "Random",
                new List <PaletteColor>()
            {
                new PaletteColor(0, r.Next() % 255, r.Next() % 255, r.Next() % 255),
                new PaletteColor(.17m, r.Next() % 255, r.Next() % 255, r.Next() % 255),
                new PaletteColor(.34m, r.Next() % 255, r.Next() % 255, r.Next() % 255),
                new PaletteColor(.5m, r.Next() % 255, r.Next() % 255, r.Next() % 255),
                new PaletteColor(.66m, r.Next() % 255, r.Next() % 255, r.Next() % 255),
                new PaletteColor(.83m, r.Next() % 255, r.Next() % 255, r.Next() % 255),
                new PaletteColor(1, r.Next() % 255, r.Next() % 255, r.Next() % 255)
            },
                false
                );

            availablePalettes = new List <Palette>()
            {
                Spectrum, Earth, EarthAndSky, HotAndCold, Forest, Seashore, Fire, CyclicFire, RedCyan, BlueGold, GrayScale, CyclicGrayScale, Random
            };


            PaletteLength     = InitialPaletteLength;
            Offset            = InitialPaletteOffset;
            IndCurrentPalette = InitialPalette;
            Cyclic            = InitialCyclic;
            RandomColors      = InitialRandom;
            IterationLim      = InitialIterationLim;

            colorSetup();
        }