Skip to content

ColorData

Named color data. Without arguments it lists the categories:

$ wo 'ColorData[]'
{Gradients, Indexed, Named, Physical}

ColorData[n, k] gives the k-th color of indexed scheme n. Scheme 1 is generated rather than tabulated — its hues advance by an irrational step, so it never repeats and takes any index:

$ wo 'Head[ColorData[1, 1]]'
RGBColor
$ wo 'Round[List @@ ColorData[1, 4], 0.000001]'
{0.24, 0.6, 0.33692}

The tabulated schemes start over past their last color:

$ wo 'List @@ ColorData[2, 1]'
{0.8588235294117647, 0.00784313725490196, 0.00784313725490196}
$ wo 'List @@ ColorData[2, 10]'
{0.8588235294117647, 0.00784313725490196, 0.00784313725490196}

ColorData[n, "ColorList"] gives the scheme's colors:

$ wo 'Length[ColorData[3, "ColorList"]]'
10

ColorData["scheme"] gives a named gradient's color function; applying it (or calling Blend with the scheme name) interpolates the gradient:

$ wo 'Head[ColorData["TemperatureMap"]]'
ColorDataFunction
$ wo 'Blend["TemperatureMap", 0]'
RGBColor[0.178927, 0.305394, 0.933501]

The "HTML" scheme is the CSS colour names:

$ wo 'ColorData["HTML", "SlateBlue"]'
RGBColor[0.4156862745098039, 0.3529411764705882, 0.803921568627451]
$ wo 'ColorData["HTML", "Aqua"]'
RGBColor[0, 1., 1.]

The "Legacy" scheme shares the same named-colour table:

$ wo 'ColorData["Legacy", "Wheat"]'
RGBColor[0.9607843137254902, 0.8705882352941177, 0.7019607843137254]