Change color interface
This is a major change breaking backwards comp: Some functions are renamed to have a more consistend naming scheme. The color conversion functions, like hsl2rgb, have this form and should be read as from space to space (here HSL to RGB). RGB colors are always a triplet of 8 bit values. All other spaces are a triplet of Double_Type in the range (0-1). Another useful converter is rgb2hex, here hex represents either a 24 bit value representing a RGB tuple, or a string representing this value in hex notation (e.g., 0xff0000 equals "ff0000", and is full red). There were a number of functions that produced a RGB color (as hex value). This functions are now all renamed to color_<something>, e.g., color_wavelength calculates the hex value that corresponds to a given wavelength. In this sence 'color' should always be understood as RGB hex value (notice, 'hex' should be understood either as hex value (that is, 'color') or as the string (see above)). The biggest changes concerns the addition of a set of functions which are all interfaced via 'get_color_palette'. This function allows to choose a palette name (see 'get_color_palette_names') and how many colors the palette should contain. See the help of the various palettes for more information. Via this interface it is also very easy to generate colormaps to be used with plotting functions. Example: cmap = get_color_palette("hsluv", 256); % parameters to the generator % function are passed via qualifiers. Not all palettes are generated, rather % a static set of specific colors. Further, I moved the xfig_mix_color to 'plot' as it is an extension of xfig (something to be fixed in the future). I also deleted the X11 rgb.txt reader functions as this file is no longer provided on most systems. If we want to provide a list of color names, maybe we should pack a file with the isisscripts?
Loading
Please register or sign in to comment