This script is designed to extract main colors from an image and use them as a color scheme for configuration files of certain Linux applications.
- Python 3.x
- Python libraries:
argparse,logging,PIL,sklearn,numpy,configparser
Run the following command to install all necessary dependencies:
pip install argparse Pillow scikit-learn numpy--image_path: Path to the input image (default: 'default.jpg')
--num_colors: Number of main colors to extract (default: 3)
--action: Action (backup/restore configuration)
--random: Use a random image from the specified directories- Extracting main colors and updating configurations:
python polywall.py --image_path example.jpg- Backup and restore configurations:
python polywall.py --action backup
python polywall.py --action restore- Setting desktop wallpaper:
python polywall.py --image_path wallpaper.jpg- Using a random image for color extraction:
python polywall.py --random- When using backup or restore action, the script saves/restores current configuration files from the 'backup' folder.
- Now, with the
--randomflag, you can use random images for color extraction.



