medialab / iwanthue

Colors for data scientists.
http://tools.medialab.sciences-po.fr/iwanthue/
Other
636 stars 57 forks source link

Sort by multiple keys #28

Open JobLeonard opened 6 years ago

JobLeonard commented 6 years ago

This may be a bit of a weird request, but I have a specific need to mostly-sort by hue, then by diff (actual sorting wouldn't work since all hue/chroma/lightness are likely to be unique).

I guess it could be implemented by limiting the significant digits being compared (maybe even allowing for control of that), then using diff as a secondary key.

I'm going to look into the source code myself to see if I can come up with a functional snippet that does what I want, to give a better example :)