A Python script that automates the process of finding and replacing specific colors in XML files, particularly in colors.xml
files found within a specified input directory and its subdirectories. This script generates corresponding target colors based on the original color's hue and handles invalid color values while preserving the original XML file structure.
- Automates the color replacement process in XML files
- Generates corresponding target colors based on the original color's hue
- Handles invalid color values
- Preserves the original XML file structure
- Python 3
- The
os
,re
, andcolorsys
libraries are utilized and included in the standard Python installation
- Update the
input_directory
andoutput_directory
variables in the script to match your local environment. - Customize the target colors and hues based on user requirements
- Ensure the script has permission to access and modify files in both the input and output directories.
- Run the script using your Python environment or by executing
python script_name.py
in your command line or terminal.
Feel free to contribute to this project by reporting issues, suggesting improvements, or submitting pull requests.