def hex_to_rgb(value):
    """Converts colour from hex triplet into rgb tuple.
        value (str): colour as hex triplet
    """
    
    value = value.lstrip('#')
    lv = len(value)
    return tuple(int(value[i:i+lv//3], 16) for i in range(0, lv, lv//3))