View License

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

» Watch video

Highlights from
Red Blue Colormap

4.8 | 6 ratings Rate this file 141 Downloads (last 30 days) File Size: 1.47 KB File ID: #25536 Version: 1.0
image thumbnail

Red Blue Colormap


Adam Auton (view profile)


A colormap from bright blue, through white, and then to bright red.

| Watch this File

File Information

REDBLUE(M), is an M-by-3 matrix that defines a colormap.
The colors begin with bright blue, range through shades of blue to white, and then through shades of red to bright red. REDBLUE, by itself, is the same length as the current figure's colormap.


This file inspired Bipolar Colormap, Rgbmap Color Maps, Cubehelix Colormaps: Beautiful, Distinct, Versatile!, and Color Brewer: Attractive And Distinctive Colormaps.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
12 Sep 2016 Gery Mandala

07 Jul 2016 Liaofan Lin


21 Apr 2016 EsniX

EsniX (view profile)

great colormap

02 Apr 2015 Stephen Cobeldick

@Rob Campbell: a good idea, but that code give the wrong length output if |m| is odd. Here is one possible fix:

n = fix(m/2);
x = n~=(m/2);
r = [(0:1:n-1)/n,ones(1,n+x)];
g = [(0:1:n-1)/n,ones(1,x),(n-1:-1:0)/n];
b = [ones(1,n+x),(n-1:-1:0)/n];
c = [r(:),g(:),b(:)];

Comment only
06 Jun 2014 Felipe Orellana

Hi Adam,

I downloaded your redblue colormap. It's nice.

Thanks a lot dude. I appreciate your effort.

thank you very much,


Comment only
28 Dec 2010 chsharrison

Just what I was looking for

21 Oct 2010 Mathias Vanwolleghem

08 Jan 2010 Rob Campbell

Rob Campbell (view profile)

Thankyou: nice colormap. What do you think of this? A neater way to obtain c:

n = fix(0.5*m);
r = [(0:1:n-1)/n,ones(1,n)];
g = [(0:n-1)/n, (n-1:-1:0)/n];
b = [ones(1,n),(n-1:-1:0)/n];
c = [r(:), g(:), b(:)];

09 Oct 2009 Xianmin

The function "colormapeditor" from MATLAB will be helpful to customizer the colormap

Comment only

Contact us