# What's the default colormap (or color scheme) used in mathematica?

(Look at the density plots or contour plots.)

An example:

I searched online, but can't seem to find any documentation or discussion of it. I searched the color schemes (http://reference.wolfram.com/language/guide/ColorSchemes.html) as well, still can't identifity which one it is.

Thanks!

"DefaultColorFunction" /. (Method/. ChartingResolvePlotTheme[Automatic, ContourPlot])


ColorData["M10DefaultDensityGradient", "ColorFunction"]


ColorData["M10DefaultDensityGradient", "Panel"]


SwatchLegend["M10DefaultDensityGradient", Table["", 15],
LegendMarkerSize -> 50, LegendLayout -> {"Row", 1}]


cp0 = ContourPlot[Sin[x y], {x, 0, 3}, {y, 0, 3}]
cp1 = ContourPlot[Sin[x y], {x, 0, 3}, {y, 0, 3},
cp2 = ContourPlot[Sin[x y], {x, 0, 3}, {y, 0, 3},


cp0 === cp1 === cp2


True

Update: To get the blending arguments we can use the function DataPacletsColorDataGetBlendArgument:

DataPacletsColorDataGetBlendArgument["M10DefaultDensityGradient"]


The functions Blend[bl, #] & and ColorData["M10DefaultDensityGradient"]@# produce the same colors:

And @@ (ColorData["M10DefaultDensityGradient"]@# == Blend[bl, #] & /@
RandomReal[1, 1000])


True

• Thanks! This is awesome. How do I extract the tabular data from the colormap?
– Alex
Commented Jan 2, 2018 at 6:18
• @Alex, you mean InputForm/@ColorData["M10DefaultDensityGradient"] /@ Range[0, 1, .1]?
– kglr
Commented Jan 2, 2018 at 6:31
• Yes! I assume that by default the number of colors is 256 in a colormap? Anyway, I found in another response below that I can get the number of native colors by Range[Length@ColorData["M10DefaultDensityGradient", "ColorList"]], if I am correct.
– Alex
Commented Jan 2, 2018 at 7:38

ColorData[97] is the default color scheme. The answer is found in a few different answers throughout this site. For example, Discussion of PointLegend and Discussion of DefaultColor. More examples can be found be searching for ColorData[97]

Below is a sample code showing that ColorData[97] matches the default colors. Note that the color of the points, created with ColorData[97], is the same as the color or the lines, created with default colors.

Plot[{Sin[x], Cos[x], Tan[x]}, {x, 0, 1.3}
, Epilog -> {PointSize[0.03],
ColorData[97, 1], Point[{1, Sin[1]}],
ColorData[97, 2], Point[{1, Cos[1]}],
ColorData[97, 3], Point[{1, Tan[1]}]
}]


The following statement will provide the RGBColor values

FullForm@ColorData[97, #] & /@
Range[Length@ColorData[97, "ColorList"]] // TableForm


Below are the results:

kglr's answer identifies the undocumented color function used by Mathematica and is, therefore, the best answer to this question. However, should you find yourself in a situation* where you don't know internals well enough to extract that kind of information, you can always fake the unknown color function with pretty good fidelity. In your case, the following is a good approximation to the actual color function Mathematica uses.

cf[u_] :=
Blend[
{RGBColor[.11, .25, 0.467], RGBColor[.89, .58, .26], RGBColor[1., 0.95, 0.70]},
u]

ContourPlot[Sin[x y], {x, 0, 3}, {y, 0, 3}, ColorFunction -> cf]


The colors used in the blend were picked of the default plot using the dropper tool found on the color picker. Like so

The step-by-step process is

1. Make a color setter with

ColorSetter[RGBColor[1, 1, 1]]

2. Click on the color setter to bring up the color picker dialog as shown above.

3. Click on the dropper tool at bottom left of the palette. You will get a drag-able magnifier.
4. Drag the magnifier over to a area which shows the color you want and click.
5. Click on the color picker's OK button. The color setter will now show the selected color.
6. Make a copy of the color setter and convert it to input form which will give an RGBColor expression for the color.

[*] Which is certainly the situation for me.

• This is very useful to know! Thanks!
– Alex
Commented Jan 2, 2018 at 6:19
• @Szabolcs. I have a ColorMunki spectrophotometer for screen and printer color calibration. It's supporting software installs an additional tab into the color picker. Commented Jan 2, 2018 at 16:18
• I just discovered that the OS X colour picker is designed to be extensible with additional tabs. There are several tools out there providing new colour picker interfaces. Thanks! Commented Jan 2, 2018 at 16:44
• You can also do a slight bit of "cheating" by just slapping DominantColors in front of the ContourPlot` (or its output)—this is a fine way to grab usable color objects (I'm not sure what they're called in WL!) for use in other code. Commented Jan 2, 2018 at 22:02
• @BenKalziqi. Good point. It's certainly quicker, but one must be careful to select from and/or reorder the results to get the right blend. Commented Jan 3, 2018 at 2:23