remove apply_formats function
remove apply_formats import
dynamically generate a function for each color