def get_rgb_2(number):
if number >= 4:
return (139,0,0)
elif number >= 3.0:
return (200,0,0)
elif number >= 2.0:
return (255,0,0)
elif number >= 1.0:
return (255,127,80)
elif number >= 0:
return (255,192,203)
elif number >= -1.0:
return (216,228,188)
elif number >= -2.0:
return (173,255,47)
elif number >= -3.0:
return (124,252,0)
elif number >= -4.0:
return (34,139,34)
else:
return (0,100,0)
python_不同的数字返回不同的rgb值
于 2024-08-20 11:50:30 首次发布