| import re | |
| __colors = [ | |
| "Amber", | |
| "Aqua", | |
| "Azure", | |
| "Beige", | |
| "Black", | |
| "Blue", | |
| "Bronze", | |
| "Brown", | |
| "Chartreuse", | |
| "Clay", | |
| "Clay", | |
| "Cyan", | |
| "Dark", | |
| "Gainsboro", | |
| "Golden", | |
| "Grape", | |
| "Green", | |
| "Grey", | |
| "Indigo", | |
| "Ivory", | |
| "Light", | |
| "Lime", | |
| "Magenta", | |
| "Maroon", | |
| "Metallic", | |
| "Mint", | |
| "Mistry", | |
| "Mustard", | |
| "Navy", | |
| "Neon", | |
| "Off", | |
| "Olive", | |
| "Orange", | |
| "Orange", | |
| "Pea", | |
| "Peru", | |
| "Pink", | |
| "Plum", | |
| "Purple", | |
| "Red", | |
| "Ruby", | |
| "Rust", | |
| "Silver", | |
| "Snow", | |
| "Teal", | |
| "Turquoise", | |
| "Violet", | |
| "Wheat", | |
| "White", | |
| "Yellow", | |
| ] | |
| def remove_colors(text: str) -> str: | |
| for color in __colors: | |
| text = re.sub(color, "", text, flags=re.I) | |
| return text | |