cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

Recommended Articles