Rename aesthetics in obj

    Parameters
    ----------
    obj : dict or list
        Object that contains aesthetics names

    Returns
    -------
    obj : dict or list
        Object that contains aesthetics names

def rename_aesthetics(obj):
    """
    Rename aesthetics in obj

    Parameters
    ----------
    obj : dict or list
        Object that contains aesthetics names

    Returns
    -------
    obj : dict or list
        Object that contains aesthetics names
    """
    if isinstance(obj, dict):
        for name in obj:
            new_name = name.replace('colour', 'color')
            if name != new_name:
                obj[new_name] = obj.pop(name)
    else:
        obj = [name.replace('colour', 'color') for name in obj]

    return obj