From 2c3a6dcc97ea8015cf075da5e78f409e4f3ea3e0 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 16 Oct 2024 16:50:10 +0100 Subject: [PATCH] reorder --- src/textual/color.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/textual/color.py b/src/textual/color.py index a71de17de8..6568ba8f3e 100644 --- a/src/textual/color.py +++ b/src/textual/color.py @@ -411,12 +411,13 @@ def tint(self, color: Color) -> Color: Returns: New color """ - r2, g2, b2, a2, ansi2 = color - if ansi2 is not None: - return self + r1, g1, b1, a1, ansi1 = self if ansi1 is not None: return self + r2, g2, b2, a2, ansi2 = color + if ansi2 is not None: + return self return Color( int(r1 + (r2 - r1) * a2), int(g1 + (g2 - g1) * a2),