If you're switching to TailwindCSS v4.0 from using safelist in v.3.4.17 make sure to pass class names to elements generated by loops as the full class name and not through concatentation. As @Karson mentioned, pass in the full string "bg-darkgreen hover:bg-hdarkgreen"
instead of using bg-${color} hover:bg-h${color}
.