def parse_sdf_str(sdf_str):
    """
    Parses SDF strings to get SDF type and keyword arguments for the function
    call.

    Args:
        sdf_str: ``str`` -> SDF strings are formatted as follows:
            "SDF:[sdf_type]:[I/F]:[parameter]=[value]:..." where value will be
            converted to either I=int or F=float, where appropriate. Colors are
            the exception, where always int is presumed in form of a tuple.

    .. note::
        SDF string Example:

        ``SDF:circle:I:radius=100:frame_color=(80,120,10):alpha=180``
        This would produce a circle with a radius of 100 pixel filled
        with the specified frame_color and alpha values.

    Returns:
        ``Tuple[Dict, str]`` -> kwargs as dictionary and the SDF type as string.
    """
    elements = sdf_str.split(':')
    try:
        isfloat = {'I': False, 'F': True}[elements[2]]
    except KeyError:
        raise ValueError(f'Expected either "I" or "F" for data type, got '
                         f'"{elements[2]}" instead.')
    converter = {
        'width': (float, int),
        'height': (float, int),
        'radius': (float, int),
        'corner_radius': (float, int),
        'border_thickness': (float, int),
        'frame_color': (
            lambda x: tuple([int(i) for i in x.strip()[1:-1].split(',')]),
        ),
        'border_color': (
            lambda x: tuple([int(i) for i in x.strip()[1:-1].split(',')]),
        ),
        'multi_sampling': (int, ),
        'alpha': (int, )
    }  # Insures that

    kwargs = {}
    w_unit = 0
    for i in elements[3:]:
        try:
            k, value = i.split('=')
        except ValueError:
            raise ValueError(f'Expected "parameter=value", got "{i}" instead.')
        if k in converter:
            try:
                kwargs[k] = converter[k][0 if isfloat else -1](value)
            except (TypeError, ValueError):
                raise ValueError(f'Unable to unpack parameter: "{i}"')
        elif isfloat and k == 'w':
            w_unit = int(value)
        else:
            raise ValueError(f'Unknown parameter: "{k}".')

    if isfloat:
        for k in kwargs:
            if converter[k][0] is float:
                kwargs[k] = int(kwargs[k] * w_unit + 0.5)

    return kwargs, elements[1]