File Exchange

image thumbnail

colorGradient: generate custom linear colormaps

version 1.0.0.0 (2.01 KB) by Jose Maria Garcia-Valdecasas Bernal
COLORGRADIENT allows you to generate a linear color gradient from color A to color B.

26 Downloads

Updated 22 May 2011

View License

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.

Cite As

Jose Maria Garcia-Valdecasas Bernal (2021). colorGradient: generate custom linear colormaps (https://www.mathworks.com/matlabcentral/fileexchange/31524-colorgradient-generate-custom-linear-colormaps), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (15)

anh ho

Works like a charm!

andreas franzke

Somaye Sheykhali

Elliot McKinnon Gray

Been using this for so long, I forgot it wasn't a matlab deafult! So intuituve!

Nicolas Herzig

Ian Campbell

Adriano

Tobias Herrmann

Kota Matsuo

Gautam Dey

Suchit

Pio Nonus

JR King

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!