Technically, the choices are vastly more improved now.
You could always have a global style variable in a framework like react, that in the end renders the "text-red-500" part. Changes are pretty easy too.
And, React has been the framework that brought this new paradigm to the forefront. The amalgamation of programming and UI design. As long as designers were at the helm of web-sites, we had tools like Adobe Dreamweaver. Once programmers were forced to do UI stuff, we had stuff like React / Vue / Angular on the horizon.
I now realize that HTML is a platform. No human should ever directly write an HTML file. We must build software that builds HTML.