View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
colorGradient: generate custom linear colormaps

4.8 | 4 ratings Rate this file 37 Downloads (last 30 days) File Size: 2.01 KB File ID: #31524 Version: 1.0
image thumbnail

colorGradient: generate custom linear colormaps



COLORGRADIENT allows you to generate a linear color gradient from color A to color B.

| Watch this File

File Information

User can generate a custom linear colormap giving 2 colors and colormap depth.

Colors are given as vectors with RGB values. The suggested input method is using intensity values for each channel (0,1), but values in the (0,255) range are also allowed.

No other colorspaces are allowed (i.e. HSV,CMYK,...).

The function outputs the colormap and an image that simplify the colormap viewing process.

Use it as an alternative to colormapeditor or to generate colormaps inside your code.


This file inspired Half Guage Display, Cubehelix Colormaps: Beautiful, Distinct, Versatile!, and Color Brewer: Attractive And Distinctive Colormaps.

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
10 May 2014 Gautam Dey

06 May 2014 Suchit

Suchit (view profile)

03 Mar 2013 Pio Nonus

19 Apr 2012 JR King

Contact us