Learn R Programming

Polychrome (version 1.6.2)

xkcdNames: 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)

Value

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

Arguments

colorset

A character vector containing hexadecimal representations of colors.

Author

Kevin R. Coombes <[email protected]>

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.

References

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

See Also

xkcd, colors.

Examples

Run this code
data(alphabet)
xkcdNames(alphabet)
colorNames(alphabet)

Run the code above in your browser using DataLab