cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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
John_Powell_JMP
Community Manager Community Manager

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!

Recommended Articles