Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I generate a generally aesthetically pleasing range of line-graph colors (unknown in number), starting with a base color?
    primarykey
    data
    text
    <p>I like the random color generation algorithm <a href="https://stackoverflow.com/questions/43044/algorithm-to-randomly-generate-an-aesthetically-pleasing-color-palette?answertab=votes#tab-top">proposed here by David Crow</a>, but I wonder if there's a way to focus its results around a single color and regulate the results.</p> <p>My program will be generating graphs that track a number of variables. Each variable belongs to one of 7 categories. I'd like to generate line-colors for these variables that are legible, unique and for which the hue, saturation and luminosity are within a proximate range of a root color which is associated with their category. For example, category Red's variables would be various legible and discernible variations on red.</p> <p>One solution might be to declare a root color, plus upper and lower boundaries for hue, saturation and luminosity. I could then randomly pull values from within those ranges, but is there a better way to hopscotch within those three dimensions so that the resulting colors have a decent amount of variation, but still leaving space to grow? For example, assume each pipe is a range value and each line is an iteration:</p> <pre><code>01 &gt; |---------------|---------------| 02 &gt; |-------|-------|---------------| 03 &gt; |-------|-------|-------|-------| 04 &gt; |---|---|-------|-------|-------| 05 &gt; |---|---|---|---|-------|-------| 06 &gt; |---|---|---|---|---|---|-------| 07 &gt; |---|---|---|---|---|---|---|---| 08 &gt; |-|-|---|---|---|---|---|---|---| 09 &gt; |-|-|-|-|---|---|---|---|---|---| 10 &gt; |-|-|-|-|-|-|---|---|---|---|---| 11 &gt; |-|-|-|-|-|-|-|-|---|---|---|---| 12 &gt; |-|-|-|-|-|-|-|-|-|-|---|---|---| 13 &gt; |-|-|-|-|-|-|-|-|-|-|-|-|---|---| 14 &gt; |-|-|-|-|-|-|-|-|-|-|-|-|-|-|---| 15 &gt; |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-| </code></pre> <p>What's the best way to do this? Or is this even the best solution to my problem? A single graph may not plot more than 4 or 5 variables, but the number of variables which can be plotted could be in the hundreds.</p> <p>Thanks for your help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. COYour question, emphasis mine: "What's the **best** way to generate a **pleasing** range of line-graph colors...?" Personally, I like the colors from green to green. So the best way is to make your range as small as possible on my favorite color. :-) Kidding aside, I really don't feel this question is appropriate for Stack Overflow, due to it's subjective nature and being unanswerable.
      singulars
    2. COThere are plenty of color scheme generators on the web. My suggestion would be to use existing color wheel approachs to build variants on a triad or double-complementary scheme, depending on the number of series. Something like [this page](http://www.worqx.com/color/combinations.htm) might help.
      singulars
    3. COI think that's an acceptable algorithim question. The "pleasing" bit is of course more bemusing than objective, and it's not a simple topic either. But OP put at least some effort into writing. Just might need a bit more elaboration/data example, and possibly a bounty as that takes time to answer. (Not sure there are any good reference answers that do what's asked for.)
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload