Finds the dominant colors of an image from the Berlin West Skyline webcam and uploads to Instagram @colors.of.berlin. The script runs automatically using Github Actions at 13:00 Berlin time. Dominant colors are extracted using the k-means clustering algorithm. The sky is detected from the image assuming that the variance of sky is smaller than non-sky part. Then 5 dominant colors are selected from the output image without the non-sky elements which is weighted depending on the number of pixels assigned to each of the cluster/color.
The python script runs automatically using Github Actions.
- Set up Windy API Key
- If wanting to upload palette canvas to Instagram, create a business Instagram account and link it to a Facebook page. Then create a Facebook developer account and you will be able to obtain an access token and an business instagram user id
- Set up Cloudinary
Install required packages by running:
pip install -r requirements.txt
python ./ColorsOfBerlin/main.py
- Idea comes from laurendorman's Color of Berlin
- The Sky detector script is from sky-detector