cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
d_barnett
Level IV

RGB Values to Color Names in Data Table

I have a data table that contains RGB values in separate columns and I want to have the name of the color ( or close to it) displayed in a seperate column.

One problem is that I can give some leeway in the values so they could be in a range of values so Black could be 0-0-0 or 5-0-0 or 0-5-0 or 0-0-5 or 5-5-0 to 5-5-5 etc. so a range of +/- 5 either side would be allowable

e.g.

   

Color NameRGB CODERGB
Black0-0-0000
Blue0-0-25500255
Light Blue173-216-230173216230
Yellow255-255-02552550
Orange255-165-02551650
Deep Pink255-20-14725520147
Pink255-192-203255192203
Brown165-42-421654242
10 REPLIES 10

Re: RGB Values to Color Names in Data Table

MS's column formula is great!

That last line is not just elegant but probably performs faster than my loops.

I updated the script RGB Color Matching Script.

Thanks MS!