-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colormaps "jet" and "hsv" #75
Comments
I found the following for the jet color LUT: http://cresspahl.blogspot.de/2012/03/expanded-control-of-octaves-colormap.html the r,g,b components of the jet LUT (256 color values) are defined by a simple scheme: r,g,b=zeros(256),zeros(256),zeros(256)
for i = 0:255
n=4*i/256
r[i+1]=255*min(max(min(n-1.5,-n+4.5),0),1);
g[i+1]=255*min(max(min(n-0.5,-n+3.5),0),1);
b[i+1]=255*min(max(min(n+0.5,-n+2.5),0),1);
end I found a list of MATLAB color LUTs here: http://matlab.izmiran.ru/help/techdoc/ref/colormap.html hsv seems to be just a variation of the typical rainbow scheme. You can easily build your own if you just work in the HSV color space, define a saturation and value (lightness) and let the hue go from 0 to 360 degrees. If you want to start the rainbow at a different color, just let the hue go from any angle to this angle+360 degrees. |
Thank you very much, I'll have a look at it when I'm back to plotting :) |
Dear Color developers:
Borrowing from MATLAB's colormaps, is it possible to create the colormaps "jet" and "hsv". If so, how could this be done?
Best,
Robert
The text was updated successfully, but these errors were encountered: