from PIL import Image, ImageDraw
# 指定RGB颜色值
red = (252, 222, 233) #
# 指定图标尺寸
size = (120, 120) # 图标尺寸
# 创建图像对象,背景为透明
image = Image.new("RGBA", size, (0, 0, 0, 0))
draw = ImageDraw.Draw(image)
# 计算圆形的位置和半径
center = (size[0] // 2, size[1] // 2)
radius = min(center)
# 绘制圆形
draw.ellipse((center[0] - radius, center[1] - radius, center[0] + radius, center[1] + radius), fill=red)
# 保存图标为图像文件
image.save("./icon/other.ico")
# 显示图标
image.show()