-
- Downloads
feat: add __len__ to ColorPalette
For downstream use being able to determine how many colors are in a ColorPalette object can be useful. E.g., checking if a user has provided a color palette that matches the number of labels. ColorPalette doesn't currenly have a __len__ attribute meaning that `mypalette.colors` has to be used for calculating lengths. This change adds __len__ to make this more intutitive by allowing `len(mypalette)`.
Please register or sign in to comment