# Color choices for graphs?

**URL:** <https://discourse.julialang.org/t/color-choices-for-graphs/19971>\
**Category:** Visualization\
**Created:** [January 23, 2019, 10:31am UTC](https://discourse.julialang.org/t/color-choices-for-graphs/19971 "2019-01-23T10:31:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [January 23, 2019, 10:31am UTC](https://discourse.julialang.org/t/color-choices-for-graphs/19971/1 "2019-01-23T10:31:04Z")

</div>

I’m looking into presenting som model structures using graphs. Below is an example of a first attempt:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/2/c23936e072adf3433741e129561196b35e7ee7b0.png)

My problem is related to choice of colors for ease of readability:

1. Is there some guideline for best choice of line colors to distinguish lines?
2. Is there some guideline for best choice of fill colors to distinguish filled areas?
3. Is there some guideline for best choice of fill colors so that text in filled areas is easily readable?

Part of the problem is related to the fact that colors that are easy to distinguish on screen, may be difficult to distinguish on printed paper, and vice versa.

I seem to recall to have seen a Julia function where one can specify the number of colors that are needed, and then the function returns a set of colors that are best distinguishable??

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [January 23, 2019, 11:48am UTC](https://discourse.julialang.org/t/color-choices-for-graphs/19971/2 "2019-01-23T11:48:10Z")

</div>

Colors.distinguishable\_colors  
I think the color suggestions are the same for 1,2 and 3.  
check e.g. the qualitative color palettes from [https://github.com/timothyrenner/ColorBrewer.jl](https://github.com/timothyrenner/ColorBrewer.jl)

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [January 23, 2019, 3:06pm UTC](https://discourse.julialang.org/t/color-choices-for-graphs/19971/3 "2019-01-23T15:06:32Z")

</div>

Thanks!
