commit 7ffdbb3b855ef9e4aa25a8ac911fce752a71e16d (tree)
parent e0561ad79be81f55d525cc9b847e0fc7f481ee16
Author: Andrew Kelley <andrew@ziglang.org>
Date: Thu, 2 Mar 2023 22:36:27 -0700
std.debug.TTY.Config: add yellow
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
@@ -635,6 +635,7 @@ pub const TTY = struct {
pub const Color = enum {
Red,
Green,
+ Yellow,
Cyan,
White,
Dim,
@@ -659,6 +660,7 @@ pub const TTY = struct {
const color_string = switch (color) {
.Red => "\x1b[31;1m",
.Green => "\x1b[32;1m",
+ .Yellow => "\x1b[33;1m",
.Cyan => "\x1b[36;1m",
.White => "\x1b[37;1m",
.Bold => "\x1b[1m",
@@ -671,6 +673,7 @@ pub const TTY = struct {
const attributes = switch (color) {
.Red => windows.FOREGROUND_RED | windows.FOREGROUND_INTENSITY,
.Green => windows.FOREGROUND_GREEN | windows.FOREGROUND_INTENSITY,
+ .Yellow => windows.FOREGROUND_RED | windows.FOREGROUND_GREEN | windows.FOREGROUND_INTENSITY,
.Cyan => windows.FOREGROUND_GREEN | windows.FOREGROUND_BLUE | windows.FOREGROUND_INTENSITY,
.White, .Bold => windows.FOREGROUND_RED | windows.FOREGROUND_GREEN | windows.FOREGROUND_BLUE | windows.FOREGROUND_INTENSITY,
.Dim => windows.FOREGROUND_INTENSITY,