Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get one of five related color schemes with favorable perceptual properties
ResourceFunction["ViridisColor"][x] evaluates the viridis color scheme at x. | |
ResourceFunction["ViridisColor"]["cname",x] evaluates the color scheme specified by "cname" at x. | |
ResourceFunction["ViridisColor"][{xmin,xmax},x] evaluates the viridis color scheme at x between xmin and xmax. | |
ResourceFunction["ViridisColor"]["Reverse",x] evaluates the viridis color scheme at x with reversed color order. | |
ResourceFunction["ViridisColor"][{"cname","Reverse"},x] evaluates the color scheme specified by "cname" in reverse at x. | |
ResourceFunction["ViridisColor"][{"cname",{xmin,xmax}},x] evaluates the color scheme specified by "cname" at x between xmin and xmax. |
Evaluate the viridis color map for a value of 0.8:
In[1]:= |
Out[1]= |
Use the viridis color map for a density plot:
In[2]:= |
Out[2]= |
List the available color schemes:
In[3]:= |
Out[3]= |
Get a color scheme by name and use it:
In[4]:= |
Out[4]= |
Get a reversed color scheme by name and use it:
In[5]:= |
Out[5]= |
ViridisColor supports a family of all related color maps, with viridis as the default:
In[6]:= |
Out[6]= |
Use the viridis color scheme in Plot3D:
In[7]:= |
Out[7]= |
Color an image with the viridis color scheme:
In[8]:= |
Out[8]= |
ViridisColor clamps the input to a region of zero to one:
In[9]:= |
Out[9]= |
ViridisColor can be used with a range specification:
In[10]:= |
Out[10]= |
ViridisColor can be used with a range and color specification:
In[11]:= |
Out[11]= |
Converted to grayscale, all color maps yield a dark to light gradient:
In[12]:= |
Out[12]= |
ViridisColor clamps values and thus needs ColorFunctionScaling to be True to use the whole value range:
In[13]:= |
Out[13]= |
All color maps and especially cividis are colorblind friendly:
In[14]:= |
Out[14]= |
This work is licensed under a Creative Commons Attribution 4.0 International License