rgb2name

버전 1.0.0.0 (5.02 KB) 작성자: matt dash
Names a color based on its RGB-triple colorspec. Knows over 400 color names.
다운로드 수: 1.3K
업데이트 날짜: 2008/12/4

라이선스 보기

RGB2NAME returns a string containing the name of the input RGB triple. (Or a cell array of strings if an array is input.) This is a "brute force" approach that contains a large list of colors and their names, and uses a very simple nearest neighbor search to find the named color that is closest to the input color.

The included list has more than 400 color names, and it performs pretty well. There are a few regions of the color space where it isn't great, particularly with low-saturation colors.

This is mostly just for kicks, but I made it for a GUI that needs to ask the user about unnamed hg objects, so instead i can describe them to the user by color. Like "...the graph with the light red and very dark green lines..."

There is also a demo included (requires java) that names colors selected by the user in a jcolorchooser.

인용 양식

matt dash (2024). rgb2name (https://www.mathworks.com/matlabcentral/fileexchange/22325-rgb2name), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Colormaps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0