get lightened color
This commit is contained in:
parent
1f01be3882
commit
07d404e64b
|
@ -85,7 +85,7 @@ def get_range_steps(start, end, count):
|
|||
|
||||
def get_percent_way(iterable):
|
||||
for ii in range(len(iterable)):
|
||||
yield iterable[ii], float(ii) / len(iterable)
|
||||
yield iterable[ii], float(ii) / (len(iterable) - 1)
|
||||
|
||||
def mirrored(iterable, full=False, tail=True):
|
||||
for ii, item in enumerate(itertools.chain(iterable, reversed(iterable))):
|
||||
|
@ -329,6 +329,10 @@ def get_hsva_color(hue, saturation=100, value=100, alpha=100):
|
|||
color.hsva = hue % 360, saturation, value, alpha
|
||||
return color
|
||||
|
||||
def get_lightened_color(color, lightness):
|
||||
h, s, _, a = color.hsla
|
||||
return get_hsla_color(h, s, lightness, a)
|
||||
|
||||
# http://www.pygame.org/wiki/BezierCurve
|
||||
def compute_bezier_points(vertices, numPoints=60):
|
||||
points = []
|
||||
|
|
Loading…
Reference in New Issue