xkcdNames: Consensus Names for Colors

View source: R/palettes.R

xkcdNamesR Documentation

Consensus Names for Colors

Description

Standardizing color names is a challenging task. Elsewhere in this package, we provide tools for assigning either standard names from the ISCC or common names from the historical "rgb.txt" files on UNIX computers. Here, we provide access toth e "consensus" color names derived froma n online survey conducted by Randall Munroe of XKCD.

Usage

xkcdNames(colorset)

Arguments

colorset

A character vector containing hexadecimal representations of colors.

Details

Each of the 949 XKCD consensus color names can be represented by the centroid of a region of CIE L*u*v* color space, all of whose points should be given the same name. This function takes colors represented in the common hexadecimal notation, maps them into L*u*v* color space, and assigns the name of the nearest XKCD color.

Value

A character string containing the standard color name nearest (in CIE L*u*v* color space) to each input color.

Author(s)

Kevin R. Coombes <krc@silicovore.com>

References

https://blog.xkcd.com/2010/05/03/color-survey-results/.

See Also

xkcd, colors.

Examples

data(alphabet)
xkcdNames(alphabet)
colorNames(alphabet)

Polychrome documentation built on May 23, 2026, 3:01 a.m.