Convert between RGB and Color Names
Nota del editor: This file was selected as MATLAB Central Pick of the Week
- Input RGB are matched to the closest palette colors using CIEDE2000, CIE94:1, CIE94:2 (default), CIE76 (i.e. Lab), CMC, DIN99, OKLab, or RGB color difference (deltaE) metrics.
- Input color name matching is case-insensitive with optional spaces, except for some palettes where whitespace or CamelCase is significant.
- the color names (string array, or cell array of char vectors).
- a numeric array of the corresponding RGB values.
- COLORNAMES_CUBE shows palette colors in a 3D cube (Lab, LCh, DIN99, HSV, OKLab, XYZ, or RGB).
- COLORNAMES_VIEW shows palette colors in 2D axes, and sorting them by various color space dimensions (Lab, XYZ, YUV, HSV, or RGB).
- COLORNAMES_DELTAE creates a figure comparing the different color difference calculations (CIEDE2000, CIE94, CIE76, DIN99, CMC, OKLab, or RGB). For more information: https://en.wikipedia.org/wiki/Color_difference
Citar como
Stephen23 (2023). Convert between RGB and Color Names (https://www.mathworks.com/matlabcentral/fileexchange/48155-convert-between-rgb-and-color-names), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Agradecimientos
Inspirado por: rgb.m, name2rgb, Color name identification: fuzzycolor, str2rgb, GETRGB (v1.0), rgb2name, GNU Emacs Color matrix, RGB.m, RGB triple of color name, version 2, Color Checker Chart, CubeHelix Colormap Generator: Beautiful and Versatile!, ColorBrewer: Attractive and Distinctive Colormaps, Intuitive RGB color values from XKCD, rgbmap color maps, alphabet, generate_ishihara(image_name, varargin), colors(name), rgb2map, color, Color segmentation by Delta E color difference
Inspiración para: Maximally Distinct Color Generator, colorpicker, MatPlotLib Perceptually Uniform Colormaps, Message Logger
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
6.1.2 | * fix description bullet points |
||
6.1.1 | * Correct description. |
||
6.1.0 | - Add palettes LeCorbusier, OsxCrayons, PWG, Wada, Werner.
|
||
6.0.0 | * Accept STRING class text inputs.
|
||
5.0.1 | Add notes on how to add a new color palette. |
||
5.0.0 | * Faster color name matching algorithm. Also more flexible, e.g.:
|
||
4.0.1 | * Improve layout of palette descriptions and error messages.
|
||
4.0.0 | * Simplify .mat file structure.
|
||
3.6.0 | * Add DIN99 colorspace for viewing and deltaE calculation.
|
||
3.5.3 | * Add "Thesaurus" and "Tableau" palettes.
|
||
3.5.2.1 | * Improve online description. |
||
3.5.2 | * Remove non-ASCII characters from file. |
||
3.5.1 | * Fixed missing variable in COLORNAMES_CUBE
|
||
3.5.0.0 | * VIEW: show RGB value with click on color name.
|
||
3.4.0.0 | * Change Lab illuminant to D65.
|
||
3.3.0.0 | * Add AmstradCPC palette.
|
||
3.2.0.0 | * Documentation changes. |
||
3.1.0.0 | * Add CIEDE2000 deltaE color distance calculation.
|
||
3.0.0.0 | * Total rewrite of the RGB matching algorithm.
|
||
2.1.0.0 | * Much more robust string matching using Levenshtein distance to pick closest colorname (Wagner–Fischer algorithm).
|
||
2.0.0.0 | * Add lots of colorschemes.
|
||
1.2.0.0 | * Add Alphabet and Kelly colorschemes. |
||
1.1.0.0 | - Downloadable as toolbox |
|
|
1.0.0.0 |