Learn R Programming

plotrix (version 1.41)

color.id: Identify closest match to a color

Description

Given a color given 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