def METHOD_NAME(cls, params: dict):
    if ('colormap' in params) or ('fallback_color' in params):
        if 'colormap' in params:
            colormap = {
                k: transform_color(v)[0]
                for k, v in params['colormap'].items()
            }
        else:
            colormap = {}
        fallback_color = params.get("fallback_color", "white")
    else:
        colormap = {k: transform_color(v)[0] for k, v in params.items()}
        fallback_color = 'white'
    return cls(colormap=colormap, fallback_color=fallback_color)