No License

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

» Watch video

Highlights from
hsl2rgb and rgb2hsl conversion

3.0 | 6 ratings Rate this file 27 Downloads (last 30 days) File Size: 2.22 KB File ID: #20292 Version: 1.0

hsl2rgb and rgb2hsl conversion



14 Jun 2008 (Updated )

Functions to convert between RGB and HSL

| Watch this File

File Information

This package consists of 3 files: rgb2hsl.m, hsl2rgb.m, and hsltest.m. The first two perform color conversion between HSL and RGB color spaces for 1d and 2d arrays(images). The last file includes unit tests for conversion.


Rgb To Hsl inspired this file.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
11 Jan 2017 molanyu


11 Oct 2016 Shahadat Hossain

The command rgb2hsl doesnt work in matlab 2016. One member has put a comment that it needs to be converted to double instead of uint8. But how can I do this. please help me.

24 Sep 2016 Leox91

Leox91 (view profile)

Thanks but this does not work in Matlab2016

27 Apr 2016 Alper Türker

rgb2hsl is not working

11 Feb 2016 Hermawan -

then what should i do sir.?

Comment only
02 Nov 2015 Ruben

Ruben (view profile)

rgb2hsl is not working properly. It needs to convert the results of some operations to double format instead of uint8

20 Sep 2009 Patrick Mineault

Works as advertised

Contact us