Is there any way to get the name of a named ColorGroup after it’s been created? I don’t see anything in the docs that indicates that you can…
I want to be able to save and restore ColorGroups using a database. I know I can get the colors from a named group using cg.Values, but if it’s a named group I’d rather save the name.
Seems you should handle this a bit differently - best approach is probably to have a dictionary of color groups where the keys are string names and values are the color groups themselves. Then you can iterate over the keys of the dictionary to get all color names and do a name to color group lookup easily.
another option is to have a class with a color group and a name property and then manage access through that class. That way the data is always tied together
I was starting to think along those lines too. Subclass ColorGroup and add a NamedColor property. It’s really an edge case that I don’t have any need for, so I’ll probably just not worry about it for now.