def rgb_to_hex_string(value):
    """Convert from an (R, G, B) tuple to a hex color.

    :param value: The RGB value to convert
    :type value:  tuple

    R, G and B should be in the range 0.0 - 1.0
    """
    color = ''.join(['%02x' % x1 for x1 in [int(x * 255) for x in value]])
    return '#%s' % color