diff --git a/src/mplhep/plot.py b/src/mplhep/plot.py index 3c1c40b4..69e1b210 100644 --- a/src/mplhep/plot.py +++ b/src/mplhep/plot.py @@ -305,8 +305,11 @@ def iterable_not_string(arg): for kwarg in kwargs: # Check if iterable if iterable_not_string(kwargs[kwarg]): - # Check if tuple (can be used for colors) - if isinstance(kwargs[kwarg], tuple): + # Check if tuple of floats or ints (can be used for colors) + all_entries_numerical = all( + isinstance(x, int) or isinstance(x, float) for x in kwargs[kwarg] + ) + if isinstance(kwargs[kwarg], tuple) and all_entries_numerical: for i in range(len(_chunked_kwargs)): _chunked_kwargs[i][kwarg] = kwargs[kwarg] else: