Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
This function requires the rgb function found here: http://www.mathworks.com/matlabcentral/fileexchange/46872
The rgb function uses a database which was created by showing hundreds of thousands of viewers more than 900 of the most commonly-used colors on the internet, and getting users to use their own words to describe that color. The result is a database of the most commonly-used names for colors, the way they are perceived on computer monitors.
The rgbmap function presented here creates color maps using any number of these strings as inputs.
SYNTAX
cmap = rgbmap('first color name','second color name')
cmap = rgbmap('first color name','second color name',...,'nth color name')
cmap = rgbmap(...,levels)
rgbmap(...)
DESCRIPTION
cmap = rgbmap('first color name','second color name') creates an RGB color map cmap from some first color to a second color.
cmap = rgbmap('first color name','second color name',...,'nth color name') creates a color map linearly scaled between any number of colors.
cmap = rgbmap(...,M) specifies the approximate number of levels |M| of the M x 3 output colormap.
rgbmap(...) sets the color map without creating an array in the workspace.
EXAMPLE
The example image shown above was created like this:
surf(peaks);
colorbar
rgbmap('pinkish purple','dark taupe','tiffany blue','azure','army green')
Citation pour cette source
Chad Greene (2026). rgbmap color maps (https://fr.mathworks.com/matlabcentral/fileexchange/46874-rgbmap-color-maps), MATLAB Central File Exchange. Extrait(e) le .
Remerciements
Inspiré par : freezeColors / unfreezeColors, COLORMAP and COLORBAR utilities (Jul 2014), RGB triple of color name, version 2, Red Blue Colormap, Generate maximally perceptually-distinct colors, XKCDIFY, Build custom colormaps, AdvancedColormap, rgb2hex and hex2rgb, Intuitive RGB color values from XKCD
A inspiré : paruly, Cyclic color map, Convert between RGB and Color Names, How to map sea level rise
Informations générales
- Version 1.2.0.0 (204 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.2.0.0 | Fix to ensure correct number of output levels. |
||
| 1.1.0.0 | included link to rgb function. |
||
| 1.0.0.0 |
