const std = @import("std"); pub const Palette = extern struct { black: u32, red: u32, green: u32, yellow: u32, blue: u32, magenta: u32, cyan: u32, white: u32, }; /// Used for escape sequences pub const Color = enum(u8) { black = 30, red = 31, green = 32, yellow = 33, blue = 34, magenta = 35, cyan = 36, white = 37, default = 39, bright_black = 90, bright_red = 91, bright_green = 92, bright_yellow = 93, bright_blue = 94, bright_magenta = 95, bright_cyan = 96, bright_white = 97, pub fn esc_seq(comptime self: Color) []const u8 { if (self == .default) return "\x1b[0m"; return std.fmt.comptimePrint("\x1b[{}m", .{@intFromEnum(self)}); } }; pub var default_colors: Palette = .{ .black = 0x000000, .red = 0xff0000, .green = 0x37dd21, .yellow = 0xfee409, .blue = 0x1460d2, .magenta = 0xff005d, .cyan = 0x00bbbb, .white = 0xbbbbbb, }; pub var default_bold_colors: Palette = .{ .black = 0x545454, .red = 0xf40d17, .green = 0x3bcf1d, .yellow = 0xecc809, .blue = 0x5555ff, .magenta = 0xff55ff, .cyan = 0x6ae3f9, .white = 0xffffff, };