Beispiel #1
0
        public static void WriteGradient(string str, GradientOptions gradientOptions)
        {
            Color colorStart = ColorTranslator.FromHtml(gradientOptions.HexColorStart);
            Color colorEnd   = ColorTranslator.FromHtml(gradientOptions.HexColorEnd);

            WriteGradient(str, colorStart, colorEnd, gradientOptions.intervals);
        }
Beispiel #2
0
        public static void WriteGradientOld(string str, GradientOptions gradientOptions)
        {
            int newR = gradientOptions.RStart;
            int newG = gradientOptions.GStart;
            int newB = gradientOptions.BStart;

            foreach (char s in str)
            {
                if (newR < gradientOptions.REnd)
                {
                    newR = gradientOptions.REnd;
                }
                if (newG < gradientOptions.GEnd)
                {
                    newG = gradientOptions.GEnd;
                }
                if (newB < gradientOptions.BEnd)
                {
                    newB = gradientOptions.BEnd;
                }
                WriteColorVT24Bit($"{s}", newR, newG, newB);
                if (gradientOptions.pauseBetweenLetters)
                {
                    // await Task.Delay(gradientOptions.pauseDelayInMilliseconds);
                }
            }
        }
Beispiel #3
0
        public static void WriteGradientBurning(string str)
        {
            GradientOptions burning = new GradientOptions()
            {
                HexColorStart            = "#F3F775",
                intervals                = 34,
                HexColorEnd              = "#F30707",
                pauseBetweenLetters      = false,
                pauseDelayInMilliseconds = 0
            };

            WriteGradient(str, burning);
        }
Beispiel #4
0
        public static void WriteLineGradientCoolBlue(string str)
        {
            GradientOptions coolBlue = new GradientOptions()
            {
                HexColorStart            = "#87E0FD",
                intervals                = 27,
                HexColorEnd              = "#1B1B07",
                pauseBetweenLetters      = false,
                pauseDelayInMilliseconds = 0
            };

            WriteGradient(str, coolBlue);
            Console.WriteLine();
        }
Beispiel #5
0
        public static void WriteLineGradientYellowToGreen(string str)
        {
            GradientOptions yellowToGreen = new GradientOptions()
            {
                HexColorStart            = "#F3F775",
                HexColorEnd              = "#07F707",
                intervals                = 34,
                pauseBetweenLetters      = false,
                pauseDelayInMilliseconds = 0
            };

            WriteGradient(str, yellowToGreen);
            Console.WriteLine();
        }