Main Content

Colormaps

View and modify colormap, control color scaling, add colorbar

Colormaps define the color scheme for many types of visualizations, such as surfaces and patches. Colorbars illustrate the relationship between the colors of the colormap and your data. Colormaps are three-column arrays containing RGB triplets in which each row defines a distinct color. The correspondence between the colors and your data values depends on the type of visualization you create. You can let MATLAB® control this correspondence, or you can customize it. For more information, see Change Color Scheme Using a Colormap.

Functions

expand all

colormapView and set current colormap
colorbarColorbar showing color scale
rgbplotPlot colormap
Colormap EditorOpen colormap editor
brightenBrighten or darken colormap
contrastCreate grayscale colormap for indexed image
climSet colormap limits (Renamed from caxis in R2022a)
rgb2hexConvert RGB triplets to hexadecimal color codes (Since R2024a)
hex2rgbConvert hexadecimal color codes to RGB triplets (Since R2024a)
hsv2rgbConvert HSV colors to RGB
rgb2hsvConvert RGB colors to HSV
parulaParula colormap array
turboTurbo colormap array (Since R2020b)
hsvHSV colormap array
hotHot colormap array
coolCool colormap array
springSpring colormap array
summerSummer colormap array
autumnAutumn colormap array
winterWinter colormap array
grayGray colormap array
boneBone colormap array
copperCopper colormap array
pinkPink colormap array
skySky colormap array (Since R2023a)
abyssAbyss colormap array (Since R2023b)
jetJet colormap array
linesLines colormap array
colorcubeColorcube colormap array
prismPrism colormap array
flagFlag colormap array

Properties

ColorBar PropertiesColorbar appearance and behavior

Topics