()
return '{0:02X}{1:02X}{2:02X}'.format(rgb[0], rgb[1], rgb[2])
Generates a random color.

    Returns:
        Color as string in HEX
Generates a random color.
Generates a random color .
def random_color():
    """Generates a random color.

    Returns:
        Color as string in HEX
    """
    hue = random.random()
    golden_ratio_conjugate = (1 + 5 ** 0.5) / 2
    hue += golden_ratio_conjugate
    hue %= 1
    rgb = tuple(int(i * 256) for i in colorsys.hsv_to_rgb(hue, 0.5, 0.95))
    return '{0:02X}{1:02X}{2:02X}'.format(rgb[0], rgb[1], rgb[2])
def random_color ( ) : hue = random . random ( ) golden_ratio_conjugate = ( 1 + 5 ** 0.5 ) / 2 hue += golden_ratio_conjugate hue %= 1 rgb = tuple ( int ( i * 256 ) for i in colorsys . hsv_to_rgb ( hue , 0.5 , 0.95 ) ) return '{0:02X}{1:02X}{2:02X}' . format ( rgb [ 0 ] , rgb [ 1 ] , rgb [ 2 ] )