second commit

This commit is contained in:
2024-12-27 22:31:23 +09:00
parent 2353324570
commit 10a0f110ca
8819 changed files with 1307198 additions and 28 deletions

View File

@ -0,0 +1,14 @@
from rich.color import Color
from rich.color_triplet import ColorTriplet
def lighten(color: Color, amount: float) -> Color:
assert color.triplet
r, g, b = color.triplet
r = int(r + (255 - r) * amount)
g = int(g + (255 - g) * amount)
b = int(b + (255 - b) * amount)
return Color.from_triplet(ColorTriplet(r, g, b))