Code covered by the BSD License  

Highlights from
Lab color scale

4.66667

4.7 | 3 ratings Rate this file 17 Downloads (last 30 days) File Size: 12.07 KB File ID: #11037
image thumbnail

Lab color scale

by Steve Eddins

 

09 May 2006 (Updated 10 May 2006)

Create color scale that prints well on grayscale printers

| Watch this File

File Information
Description

The function color_scale creates a color scale, or colormap, that is approximately uniform perceptually on both a color display and on a grayscale printer. The color scale is computed using the L*a*b* color space. It follows a uniform ramp along the L* direction, and it follows a semicircular path in the a*-b* plane.

The function color_scale_tool launches a GUI that allows you to experiment easily with different input parameters for color_scale.

For more information about these functions, see my image processing blog posting, http://blogs.mathworks.com/steve/?p=57

Acknowledgements
This submission has inspired the following:
Bipolar Colormap, Perceptually improved colormaps
Required Products Image Processing Toolbox
MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
08 Feb 2007 hassan quzmar  
04 Jul 2007 michal sh  
25 Jun 2008 Alexandre Tumlinson

Take a look at 'colorGray' which has similar functionality but with "rainbow" like color spectrum.

22 Oct 2010 Matteo Niccoli

Steve,

I do not have image processing toolbox, so I cannot really run this code. But I give the submission a 5 based on your excellent post. It was really useful for me to learn more on how to work in Lab space. I modified the code snippet in your post and combined with cline and colorspace to display L plot using the resulting RGB color:

% radius = 50;
% theta = linspace(0, pi/2, 256).';
% a = radius * cos(theta);
% b = radius * sin(theta);
% L = linspace(0, 100, 256).';
% Lab = [L, a, b];
% RGBhlx=colorspace('RGB<-Lab',(Lab));
% figure; cline(a, b, L, L,RGBhlx); view(3);
% VIEW(-165,-15);

Please login to add a comment or rating.
Updates
10 May 2006

Added pointer to blog posting for more information.

Tag Activity for this File
Tag Applied By Date/Time
color Steve Eddins 22 Oct 2008 08:24:59
color scale colormap lab grayscale Steve Eddins 22 Oct 2008 08:24:59
color scale colormap lab grayscale Eddy 02 May 2009 20:07:53

Contact us at files@mathworks.com