From 3391908a82cdf543e63eb2fbf337c980d4275e8f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 30 Aug 2023 08:48:57 -0700 Subject: [PATCH] terminal: get rid of duplicate RGB struct --- src/terminal/sgr.zig | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/terminal/sgr.zig b/src/terminal/sgr.zig index 4ba19209f..1fcb9ec48 100644 --- a/src/terminal/sgr.zig +++ b/src/terminal/sgr.zig @@ -33,7 +33,7 @@ pub const Attribute = union(enum) { /// Underline the text underline: Underline, reset_underline: void, - underline_color: RGB, + underline_color: color.RGB, reset_underline_color: void, /// Blink the text @@ -53,10 +53,10 @@ pub const Attribute = union(enum) { reset_strikethrough: void, /// Set foreground color as RGB values. - direct_color_fg: RGB, + direct_color_fg: color.RGB, /// Set background color as RGB values. - direct_color_bg: RGB, + direct_color_bg: color.RGB, /// Set the background/foreground as a named color attribute. @"8_bg": color.Name, @@ -76,12 +76,6 @@ pub const Attribute = union(enum) { /// Set foreground color as 256-color palette. @"256_fg": u8, - pub const RGB = struct { - r: u8, - g: u8, - b: u8, - }; - pub const Underline = enum(u3) { none = 0, single = 1,