Filter löschen
Filter löschen

how to get color name as output corresponding to it vector as input

6 Ansichten (letzte 30 Tage)
Rohan Singla
Rohan Singla am 16 Dez. 2020
Bearbeitet: Vinay Ramesh am 22 Dez. 2020
for eg if i give input vector a=[1,0,0] the output shold be color name corresponding to this vector

Antworten (1)

Vinay Ramesh
Vinay Ramesh am 18 Dez. 2020
Bearbeitet: Vinay Ramesh am 22 Dez. 2020
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.
Hope it helps!


Mehr zu Colormaps finden Sie in Help Center und File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by