3 ms·
An easy trick is to rotate hue with a spacing of 1.618. That guarantees maximum separation with no near collisions for any number of hues.
by kevin_thibedeau 2y ago
An easy trick is to rotate hue with a spacing of 1.618. That guarantees maximum separation with no near collisions for any number of hues.
- madcaptenor 2y agoI've heard this one before. It only takes advantage of one dimension of the color space, though, and that bugs me. On the other hand you don't have to go look up a better palette.
- jacobolus 2y agoHere's a 2-dimensional version where you pick the angles https://observablehq.com/@jrus/categorical https://observablehq.com/@jrus/categorical If you want to keep the points theoretically ideally separated out to as many as colors as you want, you can use the "plastic sequence" for your parameters, https://observablehq.com/@jrus/plastic-sequence https://observablehq.com/@jrus/plastic-sequence
- wonger_ 2y agoSo cool! The same "golden angle" is behind plant leaf spacing, for minimal overlap / maximum exposure to sunlight. https://gofiguremath.org/natures-favorite-math/the-golden-ratio/the-golden-angle/ https://gofiguremath.org/natures-favorite-math/the-golden-ra...