From 6c160741935e311ea0e6e838a05fd7438065add8 Mon Sep 17 00:00:00 2001 From: Timothe Jost <44769559+JostTim@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:03:50 +0100 Subject: [PATCH] Fixing error : ansy style code 39 instead of 48 for background --- humanfriendly/terminal/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/humanfriendly/terminal/__init__.py b/humanfriendly/terminal/__init__.py index ba9739c..f66bef5 100644 --- a/humanfriendly/terminal/__init__.py +++ b/humanfriendly/terminal/__init__.py @@ -236,7 +236,7 @@ def ansi_style(**kw): elif isinstance(color_value, numbers.Number): # Numeric values are assumed to be 256 color codes. sequences.extend(( - 39 if color_type == 'background' else 38, + 48 if color_type == 'background' else 38, 5, int(color_value) )) elif color_value: