1 import random 2 def random_color(is_light = True): 3 return (random.randint(0 ,127) + int(is_light) * 128,random.randint(0,127) + int(is_light) * 128,random.randint(0,127) + int(is_light) * 128) 4 5 back_color = random_color(is_light= True)
原文地址:https://www.cnblogs.com/chengbo2130/p/10078093.html
时间: 2024-10-12 01:02:24