Update :
It might be hard to find a palette of very distinct 24 colors. However, you can use one of the palettes available in seaborn :
import seaborn as sns #pip install seaborn
list_colors = sns.color_palette("hsv", n_colors=24)
df.plot(kind="bar", stacked=True, figsize=(20, 10), color=list_colors)