예제 #1
0
        public void SetForegroundTextColor(ConsoleColor color)
        {
            string code = AnsiSgrEscapeCodes.GetForegroundColorCode(color);

            if (code == null)
            {
                return;
            }

            WriteAnsiSgrEscapeSequence(code);
        }
예제 #2
0
        public Task SetForegroundTextColorAsync(ConsoleColor color)
        {
            string code = AnsiSgrEscapeCodes.GetForegroundColorCode(color);

            if (code == null)
            {
                return(Task.CompletedTask);
            }

            return(WriteAnsiSgrEscapeSequenceAsync(code));
        }
예제 #3
0
        public Task SetForegroundTextColorAsync(byte red, byte green, byte blue)
        {
            string code = AnsiSgrEscapeCodes.GetForegroundColorCode(red, green, blue);

            return(WriteAnsiSgrEscapeSequenceAsync(code));
        }
예제 #4
0
        public void SetForegroundTextColor(byte red, byte green, byte blue)
        {
            string code = AnsiSgrEscapeCodes.GetForegroundColorCode(red, green, blue);

            WriteAnsiSgrEscapeSequence(code);
        }