The colors in the loop below do not change and they are constant. I do not know why is that?
Thanks in advance
location = (-32.337402, 117.871796)
m = folium.Map(location=location, zoom_start=7, control_scale=True, prefer_canvas=True)
# setting a color palettte
palette = sns.color_palette(None, len(df.name.unique())).as_hex()
palette = [i for i in palette]
for id, item in enumerate(df.name.unique()):
color = palette[id]
polygons_gjson = folium.features.GeoJson(df.loc[df.name == item, 'geometry'],
style_function=lambda x: {'weight': 1,
'color': 'black',
'fillColor': color,
'fillOpacity': 1}, name = 'Paddocks delivering to {} using: '.format(str(df.site_name.values[0])) +
str(item) + ' gate', control=True)
polygons_gjson.add_to(m)
m