diff --git a/glue/config.py b/glue/config.py index 0c970e642..d12b55dce 100644 --- a/glue/config.py +++ b/glue/config.py @@ -390,7 +390,7 @@ def __getitem__(self, cmap_name): def name_from_cmap(self, cmap_desired): for name, cmap in self.members: - if cmap is cmap_desired: + if cmap is cmap_desired or cmap.name == cmap_desired.name: return name raise ValueError("Could not find name for colormap")