From 80f5e14512628d18cecd0678b7e4cbd26ed2eac3 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Fri, 9 Apr 2021 15:32:25 -0500 Subject: [PATCH] Fix ansi rgb fg (#3293) * add term size command * bug: fix ansi rgb_fg --- crates/nu-command/src/commands/ansi/command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-command/src/commands/ansi/command.rs b/crates/nu-command/src/commands/ansi/command.rs index 99d28975f8..f9f5da3e4d 100644 --- a/crates/nu-command/src/commands/ansi/command.rs +++ b/crates/nu-command/src/commands/ansi/command.rs @@ -336,7 +336,7 @@ pub fn str_to_ansi(s: &str) -> Option { // Ansi RGB - Needs to be 32;2;r;g;b or 48;2;r;g;b // assuming the rgb will be passed via command and no here - "rgb_fg" => Some("\x1b[32;2;".to_string()), + "rgb_fg" => Some("\x1b[38;2;".to_string()), "rgb_bg" => Some("\x1b[48;2;".to_string()), // Ansi color index - Needs 38;5;idx or 48;5;idx where idx = 0 to 255