Skip to main content

scripts/README.md

1This folder has some scripts I've written that use the output of dominant colours to do interesting things.
3## dominant_slices.py
5This "slices" an image based on its dominant colours: each slice contains then pixels of the original image which are closest to one of the dominant colours.
7```console
8$ python3 dominant_slices.py lighthouse.jpg --max-colours=5
9```
11Example:
13<table>
14 <tr>
15 <td>
16 #e8e3d7
17 <img src="lighthouse.e8e3d7.png">
18 </td>
19 <td>
20 #838882
21 <img src="lighthouse.838882.png">
22 </td>
23 <td>
24 #4576bb
25 <img src="lighthouse.4576bb.png">
26 </td>
27 <td>
28 #292019
29 <img src="lighthouse.292019.png">
30 </td>
31 <td>
32 #c53b4e
33 <img src="lighthouse.c53b4e.png">
34 </td>
35 </tr>
36</table>