def set_alpha(color: str, alpha: float) -> str: | |
if color.startswith('#'): | |
r, g, b = int(color[1:3], 16), int(color[3:5], 16), int(color[5:7], 16) | |
else: | |
r, g, b = 0, 0, 0 | |
return f"rgba({r}, {g}, {b}, {alpha})" | |
def get_desc(data): | |
res = {name: list(dt.to_dict().keys()) for name, dt in data.items()} | |
return "\n".join([ | |
f"**{name}**: min={min(dt)}, max={max(dt)}" for name, dt in res.items() | |
]) |