Feed on

it’s surprisingly easy to desaturate colors in matlab.  the trick is to use the HSV (hue, saturation, value) transformation to do so.  for instance, to desaturate the color blue ([0 0 1] in RGB-speak) by 25%, use the following commands:

>> desat = [1 0.75 1];

>> blue_desat = hsv2rgb(desat.*rgb2hsv([0 0 1]));



Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

Did I get this wrong? Let me know!

Trackback URI | Comments RSS