# What is the default blue for the Plot? [duplicate]

My code is a simple function which I plot for two different times t

up[x_, t_] := un*Exp[I*((kr + I*ki)*x - (wr + I*wi)*t)];

un = 1;
kr = 2*Pi;
ki = 0.1;
wr = 0.1;
wi = 0.1;

a0 = Show[
Plot[Re[up[x, 1]], {x, 0, 10}, PlotRange -> All,
AxesLabel -> {Style["x", FontSize -> 13],
Style["q'", FontSize -> 13]},
PlotLegends ->
PointLegend[{Blue}, {"\!$$\*SubscriptBox[\(t$$, $$0$$]\)"}]],
Plot[Re[up[x, 5]], {x, 0, 10}, PlotRange -> All,
AxesLabel -> {Style["x", FontSize -> 13],
Style["q'", FontSize -> 13]}, PlotStyle -> Orange,
PlotLegends ->
PointLegend[{Orange}, {"\!$$\*SubscriptBox[\(t$$, \
$$1$$]\)>\!$$\*SubscriptBox[\(t$$, $$0$$]\)"}]]]


How to set the same blue tone from Plot (default) to the legend label?

• ColorData[97][1] at least in version 11 Commented Mar 14, 2018 at 19:12
• Here's an answer with this and more: mathematica.stackexchange.com/a/54632/38205 Commented Mar 14, 2018 at 19:44
• You can see all the colors used, including axes, with InputForm@DeleteDuplicates@Cases[plot, _?ColorQ, Infinity]. Commented Mar 14, 2018 at 19:58

Plot[{Re[up[x, 1]],Re[up[x, 5]] }, {x, 0, 10}, PlotRange -> All,
AxesLabel -> {Style["x", FontSize -> 13],  Style["q'", FontSize -> 13]},
PlotLegends -> PointLegend[Automatic,{Subscript[t,0]  ,Subscript[t,1]>Subscript[t,0]}]]


Using ColorData[97,"ColorList"][[;;2]] in place of Automatic gives the same result.

If you do not specify a color, the legend will get it from the plot:

a0 = Show[
Plot[Re[up[x, 1]], {x, 0, 10}, PlotRange -> All,
AxesLabel -> {Style["x", FontSize -> 13],
Style["q'", FontSize -> 13]},
PlotLegends -> PointLegend[{"\!$$\*SubscriptBox[\(t$$, $$0$$]\)"}]],
Plot[Re[up[x, 5]], {x, 0, 10}, PlotRange -> All,
AxesLabel -> {Style["x", FontSize -> 13],
Style["q'", FontSize -> 13]}, PlotStyle -> Orange,
PlotLegends ->
PointLegend[{"\!$$\*SubscriptBox[\(t$$, $$1$$]\)>\!$$\*SubscriptBox[\(t$$, $$0$$]\)"}]]]