i finished the thing...
- added a conversion to
lab
space (withskimage.color.rgb2lab
) and did the clustering / averaging in that space - convert back to
rgb
(skimage.color.lab2rgb
)- this was still a bit too dark
- adjust the exposure with
skimage.exposure.adjust_log
[1] (using the default parameters). - created a colour map with the help of
ListedColourmap
andBoundaryNorm
. the latter of which is new to me, along with thespacing="proportional"
argument that allows the height of each block of colour in the colour bar to be proportional[2] to the range it spans.
and so. here’s Ρόδος (fig 1)

the code for this is ok. not super fragile. but far from here’s-a-nice-easy-to-use-package-that-any-schmuck-can-use. sorry. working out how to do such a thing is on the (back of my mind) to-do list.
will i ever use this in a ✨science✨ context?
no. of course not.
will i ever use it?
no. probably not.
does this mean this was a largely pointless exercise?
no. here’s another one (fig 2).

# an update
# seasonal palettes
i had the thought when first doing this, but didn’t bother to actually do it. but that wasn’t good enough. so, here (fig 3) is the same area, with the same elevation bins, coloured in with the colours of late winter and summer.

# another idea
to identify individual water bodies[3] and get the average colour for those separately.