Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jul 20, 2024
1 parent 1c5c080 commit cc09b28
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/textual/renderables/_blend_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,3 @@ def blend_colors(color1: Color, color2: Color, ratio: float) -> Color:
g1 + (g2 - g1) * ratio,
b1 + (b2 - b1) * ratio,
)


def blend_colors_rgb(
color1: tuple[int, int, int], color2: tuple[int, int, int], ratio: float
) -> Color:
"""Blend two colors given as a tuple of 3 values for red, green, and blue.
Args:
color1: The first color.
color2: The second color.
ratio: The ratio of color1 to color2.
Returns:
A Color representing the blending of the two supplied colors.
"""
r1, g1, b1 = color1
r2, g2, b2 = color2
return Color.from_rgb(
r1 + (r2 - r1) * ratio,
g1 + (g2 - g1) * ratio,
b1 + (b2 - b1) * ratio,
)

0 comments on commit cc09b28

Please sign in to comment.