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

Module for generating nice colors/color schemes #77

Closed
byorgey opened this issue Mar 22, 2013 · 6 comments
Closed

Module for generating nice colors/color schemes #77

byorgey opened this issue Mar 22, 2013 · 6 comments

Comments

@byorgey
Copy link
Member

byorgey commented Mar 22, 2013

I often find myself at a loss as to how to pick some nice colors for my diagrams. I end up just using the color names I know (red, blue, green, ...) but this means I often run out of colors, and those colors are not necessarily the nicest for whatever it is I want to do.

Someone who knows a thing or two about design, color theory, etc. as well as how to use the colour library (or just someone willing to learn the foregoing!) should create a module with some functions for generating colors/color schemes. Ideas include:

  • Use evenly spaced points along a space-filling 3D curve through some color space to pick a sequence of distinct colors where adjacent colors in the sequence are "similar" (e.g. see http://corte.si/posts/code/hilbert/portrait/index.html)
  • Or do something similar for picking colors spaced around a color wheel
  • Generate "opposite" pairs of colors or contrasting triplets of colors, etc. (maybe this is just the same as the above)?
  • Provide an easy way to load color schemes from some publicly accessible repository (e.g. https://kuler.adobe.com/)
  • Generate a sequence of colors "interpolating" between two given colors by traveling around a color wheel or through a color space. (I am not sure exactly what doing blend k for values of k between 0 and 1 corresponds to, but it seems like it sometimes doesn't look like what I expect.)

I'm sure there are other cool things that could be provided as well, these are just suggestions.

@byorgey
Copy link
Member Author

byorgey commented Apr 4, 2013

@byorgey byorgey closed this as completed Apr 4, 2013
@byorgey byorgey reopened this Apr 4, 2013
@byorgey
Copy link
Member Author

byorgey commented Apr 4, 2013

Another idea (from ClaudiusMaximus) is to pick successive points in a color wheel by rotating by the golden angle each time.

@cartazio
Copy link

cartazio commented Apr 4, 2013

I've some thoughts on this i'll start experimenting with / borrowing from d3 and other communities later this month. Happy to try and make it diagrams generic rather than specific to my use cases

@byorgey
Copy link
Member Author

byorgey commented Apr 4, 2013

More potentially relevant links:

@jeffreyrosenbluth
Copy link
Member

I issued a pull request for a module palettes that can serve as a start: #139.
All it does right now is provide a small API to use the colors from d3's color categories.

@bergey
Copy link
Member

bergey commented Dec 10, 2013

@jeffreyrosenbluth has uploaded palette to Hackage. I think it fulfills most of the goals of this Issue.

@bergey bergey closed this as completed Dec 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants