leaflet(data=SPDF)%>% addTiles() %>% addPolygons(data=SPDF,
                                                 fillColor = ~mypalette(value),
                                                 fillOpacity = 1, smoothFactor = 0.5,
                                                 popup= mytext,color="white", weight=0.3,
                                                 highlight = highlightOptions( weight = 5,bringToFront = TRUE)
)