Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve auto-generated colors - visual distunguishability #714

Open
breznak opened this issue Jan 19, 2016 · 3 comments
Open

Improve auto-generated colors - visual distunguishability #714

breznak opened this issue Jan 19, 2016 · 3 comments

Comments

@breznak
Copy link

breznak commented Jan 19, 2016

I'd like to suggest an improvement to the way how colors are automatically assigned by the algorithm, the current code is in:

var idx = i % 2 ? (half + (i + 1)/ 2) : Math.ceil((i + 1) / 2);

From my experience described at
davidmerfield/randomColor#50 (comment)
this does not work as expected (for larger, ~11) number of elements.

My proposal is to offload this functionality to a specialized library https://github.com/davidmerfield/randomColor/ that works reasonably well, is distributed by npm, bower and has further plans to improve the feature: davidmerfield/randomColor#50

What do you think about that?
Cheers,

@danvk
Copy link
Owner

danvk commented Jan 19, 2016

Can you include a before/after of the generated colors for N=1, 2, 3, ... in this issue?

@danvk
Copy link
Owner

danvk commented Jan 19, 2016

(I'm open to changing the color selection.)

@breznak
Copy link
Author

breznak commented Jan 19, 2016

  • The current coloring: (see the labels at right side)
  • proposed change:

I'm still looking at using randomColor, will provide example when implemented. But their demo can be seen at:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants