What are the standard colors for plots in Mathematica?

Robert Filter picture Robert Filter · Mar 22, 2011 · Viewed 16.1k times · Source

(Note: All the answers to this question are valid for versions of Mathematica before version 10. For versions 10 and above, see https://mathematica.stackexchange.com/questions/54486/how-to-access-new-colour-schemes-in-version-10 and https://mathematica.stackexchange.com/questions/54629/what-are-the-standard-colors-for-plots-in-mathematica-10.)

When using the Plot or ListPlot command in Mathematica, certain default colors are chosen.

For reasons of uniformity within some report I would like to use them along with the PlotStyle option. It turned out that I cannot reproduce the default colors with the pre-defined color names, although blue and purple seem to be somehow close.

Hence my question:

How can I chose the standard colors used by Mathematica in plots along with PlotStyle?

Thank you in advance.

Nice answers were given by belisarius and Sjoerd from which we can conclude that

Plot[Sin[x], {x, 0, 2 Pi}, PlotStyle -> ColorData[1, 4]]

will result in a sine plotted in the fourth standard color, some nice green.

Answer

Eli Lansey picture Eli Lansey · Mar 15, 2012

I know this is really late to the game, but the expression used to generate the nth color in ColorData[1] is:

Hue[FractionalPart[0.67 + 2.0 (i - 1)/GoldenRatio], 0.6, 0.6]

Update Based on Alexey's comment below, you can find this using:

ColorData[1] // InputForm