def METHOD_NAME(self, input_color, format, expected):
    if format is not None:
        kwargs = {'format': format}
        if format == 'tuple':
            use_allclose = True
        else:
            use_allclose = False
    else:
        kwargs = {}
        use_allclose = True
    actual = ginga.colors.lookup_color(input_color, **kwargs)
    if use_allclose:
        assert_allclose(actual, expected)
    else:
        assert actual == expected