how to get color name as output corresponding to it vector as input
8 ビュー (過去 30 日間)
古いコメントを表示
for eg if i give input vector a=[1,0,0] the output shold be color name corresponding to this vector
0 件のコメント
回答 (1 件)
Vinay Ramesh
2020 年 12 月 18 日
編集済み: Vinay Ramesh
2020 年 12 月 22 日
Doesn't look like there is a built in MATLAB function which takes the RGB vector as input and gives the corresponding long or short name of the color as output. You could see the list of eight predefined colors with their RGB triplet equivalents, short names and longnames in the below documentation link
Also, here is the link to a Blog post on a File Exchange community pick about the conversion between RGB and color names. https://blogs.mathworks.com/pick/2019/04/26/convert-between-rgb-and-color-names/
Hope it helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!