... and if the description of the k-means algorithm sounds just a tad too abstract & boring for you, I've written a blog-post on how I used it to write a library that generates beautiful color palettes.
Worth reading if I may say so myself ๐
https://fribbledom.com/posts/an-algorithm-to-generate-color-palettes/