Closed skiz closed 1 month ago
The colors in a terminal emulator are usually defined in the configuration for that terminal. For example, in Kitty (also available on a Mac), you define colors 1-15 in kitty.conf
or select a theme from Kitty. Then when you call a color from Zig, like we do in Ziglings (as in your example), the text will be displayed exactly as you defined it. Please try that with Kitty or another modern TE.
Addendum: In Ziglings we send the escape sequence \x1b[31m
for the color red to the terminal. In kitty.conf you define color1 #xyz..
for red. If you change that to color1 #9ece6a
, for example, you will see the error messages in green. Not what you want. But there is a very good tool on the web that allows you to fine-tune your favorite color: ColorHexa
Those colors aren't coming from Zig, they are from the build.zig
of Ziglings.
Zig Version
0.14.0-dev.1510+fb0028a0d
Steps to Reproduce and Observed Behavior
Whenever I receive a compiler error, it's extremely painful to read the actual error line.
This is using the default "Basic" terminal theme on Mac.
Dim Red is a poor choice on a dark terminal. I think most people would actually prefer standard red for error text.
Expected Behavior
I would expect that the errors be readable on a default terminal session, and have the colors configurable via environment variables.