1. Preperation: Put color values in a file. One hex value per line. Case does not matter. (See old_color_example.txt for an example.)
2. Execute script python3 hex_replace.py /path/to/old_color_example.txt /path/to/YourColorScheme.thTheme
3. Result: A copy of your .tmTheme file will be generated with all the respective hex values replaced.
Modification of placeholder:
You can simply state a custom placeholder value as a third command line argument. Like so:
python3 hex_replace.py /path/to/old_color_example.txt /path/to/YourColorScheme.thTheme CUSTOM_PLACEHOLDER