I'm converting all (16*9) buckets to xyY, and then removing the 25% (36) of those that are the least saturated. The result's pretty decent. Might want to add some user options for how this actually works.
Thoughts
Smarter
Ignore color contribution for very very dim and unsaturated values (i.e. blacks, dark greys), but still use their luminance contribution
Use x/y/Y the whole way through instead of converting at the end
Alternative
Reduce the number of colors (colour quantization) and pick the most interesting / distribute them among the lights
Remove 'most outlying 30% of color' and recalculate mean
Use the geometrical median or an approximation thereof
Solution this ended on in f0a3e04
I'm converting all (16*9) buckets to xyY, and then removing the 25% (36) of those that are the least saturated. The result's pretty decent. Might want to add some user options for how this actually works.
Thoughts
Smarter
Alternative