Skip to content

Commit 2c3a6dc

Browse files
committed
reorder
1 parent 71ea907 commit 2c3a6dc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/textual/color.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,13 @@ def tint(self, color: Color) -> Color:
411411
Returns:
412412
New color
413413
"""
414-
r2, g2, b2, a2, ansi2 = color
415-
if ansi2 is not None:
416-
return self
414+
417415
r1, g1, b1, a1, ansi1 = self
418416
if ansi1 is not None:
419417
return self
418+
r2, g2, b2, a2, ansi2 = color
419+
if ansi2 is not None:
420+
return self
420421
return Color(
421422
int(r1 + (r2 - r1) * a2),
422423
int(g1 + (g2 - g1) * a2),

0 commit comments

Comments
 (0)