I reduced an image to 12 colors, annotated with some text (here it's color saturation, sorted) :
The text color is %[pixel:p{10,10}*2] (background *2) (I made a little script that I can share if you're interested).
As you can see, text is not very readable (contrast) in all cases (colors). Is there a smarter formula than a simple linear scaling to make text pop in all/most cases ?


