Lots of refactoring and better-making. Importantly: there will now only be one class/id generated per unique color.
Added a makefile to minify the script. Don't judge me.