No Pastel color output in macOS Terminal
See original GitHub issueIn the example below, the first WriteLine does not output red in the macOS Terminal (Catalina). However, the second WriteLine does output in red.
using System;
using System.Drawing;
using Pastel;
namespace TestColorOutput
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!".Pastel(Color.Red));
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Hello World!");
}
}
}
Notes
NO_COLOR
is not defined- Terminal preferences: Display ANSI colors is enabled.
- Terminal preferences: Declare Terminal as xterm-256-color. I’ve tried other terms with no success.
I also tested the above example in Windows 10 and Ubuntu 18.04 which behaves as expected.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Terminal showing single color for all text
Terminal colours can be controlled by the themes (in the Preferences > Settings tab). Select new theme to confirm the other one is...
Read more >How to enable colorized output for ls command in MacOS
Explains how to configure and enable Apple MacOS X (macOS) Terminal to have colorful ls command colorized output for bash shell permanently.
Read more >Add Color to the Terminal in Mac OS X
How to Add Color 'ls' Command Output in Mac OS X Terminal · Open Terminal and type: · Use the arrow keys to...
Read more >Customizing iTerm. Creating a display profile with Pastel ...
You can easily customize the color scheme from iTerm's preference. ... Defining the colors does not automatically colorize all output though ...
Read more >How to get colored output in Mac terminal? - ssh
I recently tried to connect to a server via SSH using the Mac Terminal and ran the HTOP command, but the output was...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve read somewhere before that ANSI codes have limited support on macOS but can’t verify for sure. As I’m not a daily user of Mac myself it’s hard for me to test this out. Feel free to post a PR if you come up with a fix or if you find out more information on the state of ANSI color codes in the Mac ecosystem that could be of use in developing a solution.
I understand but as no one has contributed with a pull request in support of a solution I’d keep things tidy to not have a bunch of stale issues lying around. If things change I’d gladly reopen the issue or post a new one.