Intuitive RGB color values from XKCD
This function returns the RGB triplet for almost any color. And unlike the way colors are somewhat officially defined (http://en.wikipedia.org/wiki/Web_colors), this data set describes returns values for the ways that colors are actually perceived on computer monitors. Color names are intuitive because they are based on a survey of over 200,000 user sessions, wherein respondents were shown colors and asked to fill in their word for that color. You won't find "puke green" on Wikipedia's list of web colors, despite the fact that it's a color name that people use and understand.
Data come from an XKCD survey described here: http://blog.xkcd.com/2010/05/03/color-survey-results/
A chart of available colors and their most common names can be found here: http://xkcd.com/color/rgb/
Syntax
RGB = rgb('Color Name')
RGB = rgb('Color Name 1','Color Name 2',...,'Color Name N')
RGB = rgb({'Color Name 1','Color Name 2',...,'Color Name N'})
Description
RGB = rgb('Color Name') returns the RGB triplet for a color described by 'Color Name'.
RGB = rgb('Color Name 1','Color Name 2',...,'Color Name N') returns an N by 3 matrix containing RGB triplets for each color name.
RGB = rgb({'Color Name 1','Color Name 2',...,'Color Name N'}) accepts list of color names as a character array.
Citation pour cette source
Chad Greene (2024). Intuitive RGB color values from XKCD (https://www.mathworks.com/matlabcentral/fileexchange/46872-intuitive-rgb-color-values-from-xkcd), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Image Segmentation > Color Segmentation >
Tags
Remerciements
Inspiré par : RGB triple of color name, version 2, Generate maximally perceptually-distinct colors, XKCDIFY, rgb2hex and hex2rgb, Megan Simulator (XKCD), cmocean perceptually-uniform colormaps
A inspiré : Cyclic color map, Maximally Distinct Color Generator, Convert between RGB and Color Names, xkcd1930, colorpicker, How to estimate subglacial water routes, rgbmap color maps, Post-glacial rebound, MatPlotLib Perceptually Uniform Colormaps
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
XKCD_RGB/
XKCD_RGB/html/
Version | Publié le | Notes de version | |
---|---|---|---|
1.5.0.0 | The rgb data are now included in the zip file. |
||
1.4.0.0 | Fixed a bug in the installation script. Installation is now performed fully within the rgb function. |
||
1.3.0.0 | Included hex2rgb function and improved error handling. |
||
1.2.0.0 | Now supports multiple inputs and offers help for misspelled inputs. |
||
1.1.0.0 | Link to hex2rgb, rgb2hex. |
||
1.0.0.0 |