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)
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)