示例#1
0
def randomDimColor(value):
    hue = randomF()
    sat = randomF()/2.0 + .5
    val = value
    hue, sat, val = colorsys.hsv_to_rgb(hue, sat, val)
    ret = array([hue, sat, val])
    return floatToIntColor(ret)    
示例#2
0
def randomBrightColor():
    hue = randomF()
    sat = randomF()/2.0 + .5
    val = 1.0
    hue, sat, val = colorsys.hsv_to_rgb(hue, sat, val)
    ret = array([hue, sat, val])
    return floatToIntColor(ret)