コード例 #1
0
ファイル: ChromaSettingsUI.cs プロジェクト: angturil/Chroma
        private static void InitializePresetList()
        {
            colourPresets = new List <NamedColor>();// new List<Tuple<string, Color>>();

            ColourManager.SaveExampleColours();

            //TODO add custom colours
            List <NamedColor> userColours = ColourManager.LoadColoursFromFile();

            if (userColours != null)
            {
                foreach (NamedColor t in userColours)
                {
                    colourPresets.Add(t);
                }
            }

            // CC GitHub to steal colours from
            // https://github.com/Kylemc1413/BeatSaber-CustomColors/blob/master/ColorsUI.cs
            foreach (NamedColor t in new List <NamedColor> {
                new NamedColor("DEFAULT", Color.clear),

                new NamedColor("Notes Red", ColourManager.DefaultA),
                new NamedColor("Notes Blue", ColourManager.DefaultB),
                new NamedColor("Notes Magenta", ColourManager.DefaultAltA),
                new NamedColor("Notes Green", ColourManager.DefaultAltB),
                new NamedColor("Notes Purple", ColourManager.DefaultDoubleHit),
                new NamedColor("Notes White", ColourManager.DefaultNonColoured),
                new NamedColor("Notes Gold", ColourManager.DefaultSuper),

                new NamedColor("Light Ambient", ColourManager.DefaultLightAmbient),
                new NamedColor("Light Red", ColourManager.DefaultLightA),
                new NamedColor("Light Blue", ColourManager.DefaultLightB),
                new NamedColor("Light Magenta", ColourManager.DefaultLightAltA),
                new NamedColor("Light Green", ColourManager.DefaultLightAltB),
                new NamedColor("Light White", ColourManager.DefaultLightWhite),
                new NamedColor("Light Grey", ColourManager.DefaultLightGrey),

                new NamedColor("Barrier Red", ColourManager.DefaultBarrierColour),

                new NamedColor("CC Elec. Blue", new Color(0, .98f, 2.157f)),
                new NamedColor("CC Dark Blue", new Color(0f, 0.28000000000000003f, 0.55000000000000004f)),
                new NamedColor("CC Purple", new Color(1.05f, 0, 2.188f)),
                new NamedColor("CC Orange", new Color(2.157f, .588f, 0)),
                new NamedColor("CC Yellow", new Color(2.157f, 1.76f, 0)),
                new NamedColor("CC Dark", new Color(0.3f, 0.3f, 0.3f)),
                new NamedColor("CC Black", new Color(0f, 0f, 0f)),

                new NamedColor("K/DA Orange", new Color(1.000f, 0.396f, 0.243f)),
                new NamedColor("K/DA Purple", new Color(0.761f, 0.125f, 0.867f)),
                new NamedColor("Klouder Blue", new Color(0.349f, 0.69f, 0.957f)),
                new NamedColor("Miku", new Color(0.0352941176f, 0.929411765f, 0.764705882f)),
            })
            {
                colourPresets.Add(t);
            }
        }