plotrix (version 3.6-4)

color.id: Identify closest match to a color

Description

Given a color specified as a hex string, find the closest match in the table of known (named) colors

Usage

color.id(col)

Arguments

col
a color specified as a hex string

Value

the name of the closest match

Details

finds the color with the minimum squared distance in RGB space

See Also

col2rgb,colors

Examples

Run this code
 color.id("#cc00cc")

Run the code above in your browser using DataLab