What colorscales are available in plotly, and which are the default?

Very confused. “Viridis” is available, but not mentioned in the documentation. There is a link https://plot.ly/ipython-notebooks/color-scales/ that shows a lot of color scales, but since it’s missing Viridis, I don’t know what else it’s missing.

And also I couldn’t figure out what plotly uses as a default color scale for a marker / line / etc. (does it depend on the context?).

2 Likes

This is the list of Plotly colorscales:
[‘Blackbody’,
‘Bluered’,
‘Blues’,
‘Earth’,
‘Electric’,
‘Greens’,
‘Greys’,
‘Hot’,
‘Jet’,
‘Picnic’,
‘Portland’,
‘Rainbow’,
‘RdBu’,
‘Reds’,
‘Viridis’,
‘YlGnBu’,
‘YlOrRd’]

The default colorscale is ‘RdBu’.
You can convert the new magma and parula matplotlib colormaps, respectively cmocean colormaps (http://matplotlib.org/cmocean/) to Plotly colorscales,
as it is shown here:
https://plot.ly/python/matplotlib-colorscales/
https://plot.ly/python/cmocean-colorscales/

4 Likes

Thank you! Where did you find this info?

3 Likes

Looking for a color-by-value option: I’d like to apply a colorscale like to some scatter plot data (a ternary plot actually…similar to a scatterplot in which there are x,y,z coordinates and a forth column “c” that would have a numerical value to be scaled by color). It is not clear how to assign colors this way via Plot.ly 2.0. Please advise.

This would be helpful to know. Many colors in the list above are not available in plotly for R, but if we knew where to look we could determine availability.

1 Like

Just to add - there are colour scales defined in the JS code here (plotly.js repo at /src/components/colorscale/scales.js).

Presumably the code is the definitive list. It might be updated slightly since empet’s post - I just tried Cividis and it seems to work.

hi,
i have the same problem. did u find the solution for this?
Thank you

It seems some colorscales don’t work with cufflinks.

Canonical answer as of Plotly.py 4.0

The built-in continuous colorscales are now documented here, including nice swatches: https://plot.ly/python/builtin-colorscales/

The defaults depend on which template you use, and the default template uses Plasma. See https://plot.ly/python/templates/ for more details, including previews of the built-in templates.

1 Like