code: def _get_color_list():
      
      if 'axes.prop_cycle' in plt.rcParams:
          return [p['color'] for p in list(plt.rcParams['axes.prop_cycle'])]
      else:
          return plt.rcParams['axes.color_cycle']
docs: Get cycle of colors in a way compatible with all matplotlib versions