Archived
1
0
Fork 0
This commit is contained in:
多羅狼 2023-02-18 15:56:56 +08:00 committed by GitHub
parent 770cffee41
commit 9f78c0889e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,11 +50,10 @@ async def _(msg: Bot.MessageSession):
color_name = ''
color_name_short = ''
if color_name_raw[1]:
color_name = f'CSS 名称: {color_name_raw[0]}\n'
color_name = f'CSS 颜色名称: {color_name_raw[0]}\n'
color_name_short = f'{color_name_raw[0]}'
elif color_name_raw[0] is not None:
color_name = f'最相似的 CSS 名称: {color_name_raw[0]}\n'
color_name_short = f'{color_name_raw[0]} (approx.)'
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)
await msg.finish([f'{color_name}HEX{color_hex}\nRGB{color_rgb}\nHSL{color_hsl}', BotImage(img)])