Archived
1
0
Fork 0

text size test

This commit is contained in:
多羅狼 2023-02-18 16:00:49 +08:00 committed by GitHub
parent 9f78c0889e
commit 8205aeb042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ async def _(msg: Bot.MessageSession):
elif color_name_raw[0] is not None:
color_name = f'最相似的 CSS 颜色名称: {color_name_raw[0]}\n'
draw.multiline_text((300, 300), f'{color_name_short}\n{color_hex}\n{color_rgb}\n{color_hsl}', font=font, fill=contrast, anchor='mm', align='center', spacing=20)
draw.multiline_text((400, 400), f'{color_name_short}\n{color_hex}\n{color_rgb}\n{color_hsl}', font=font, fill=contrast, anchor='mm', align='center', spacing=20)
await msg.finish([f'{color_name}HEX{color_hex}\nRGB{color_rgb}\nHSL{color_hsl}', BotImage(img)])
def get_luminance(color: webcolors.HTML5SimpleColor):