def hsv(cls, hue, saturation, value):
assert 0 <= hue <= 1 and 0 <= saturation <= 1 and 0 <= value <= 1
r, g, b = colorsys.hsv_to_rgb(hue, saturation, value)
return cls(round(r * 0xFF), round(g * 0xFF), round(b * 0xFF))
评论列表
文章目录