Subscribe Bookmark RSS Feed


May 30, 2014

RGB Color Matching Script

This script is a suggested solution for Re: RGB Values to Color Names in Data Table.

It uses the values in the Red, Green, and Blue columns to look for a color name in a color table and put the name in the Color Name Column.

The script also sets the cell color for the sample and the color name. Here's an example of the results of running the script:


The rows near the bottom, are exact color matches followed by close matches.

Note: It looks like if you try to color a cell with pure black, white is used instead.

I'm not the most experienced JSL programmer so I asked melaniedrake for advice. Thanks, Melanie.

I attached a new version of the script inspired by MS in the comments of Re: RGB Values to Color Names in Data Table.

Article Tags