It seems like you need to add the color to the safelist as described in Tailwind docs. Tailwind - safelisting classes