def _hex_to_rgb(value):
    """ Return an RGB tuple (float 0 to 1) from an hexadecimal 
	string representation. """
    value = value.lstrip('#')
    char_per_color = len(value) // 3
    red = int(value[0:char_per_color], base=16)
    green = int(value[char_per_color:2 * char_per_color], base=16)
    blue = int(value[2 * char_per_color:], base=16)
    max_bits = 16 ** char_per_color - 1
    return red / max_bits, green / max_bits, blue / max_bits
