Type: | Package |
Title: | Color Names from the XKCD Color Survey |
Version: | 1.0 |
Author: | Thomas Lumley, using data from Randall Munroe and about 2.2e5 survey participants |
Maintainer: | Thomas Lumley <t.lumley@auckland.ac.nz> |
Description: | The XKCD color survey asked participants to name colours. Randall Munroe published the top thousand(roughly) names and their sRGB hex values. This package lets you use them. |
Imports: | grDevices, FNN |
License: | MIT + file LICENSE |
NeedsCompilation: | no |
Packaged: | 2016-04-22 01:31:51 UTC; tlumley |
Repository: | CRAN |
Date/Publication: | 2016-04-22 08:40:12 |
Color Names from the XKCD Color Survey
Description
The XKCD color survey asked participants to name colours. Randall Munroe published the top thousand(roughly) names and their sRGB hex values. This package lets you use them.
Details
The DESCRIPTION file:
Package: | xkcdcolors |
Type: | Package |
Title: | Color Names from the XKCD Color Survey |
Version: | 1.0 |
Author: | Thomas Lumley, using data from Randall Munroe and about 2.2e5 survey participants |
Maintainer: | Thomas Lumley <t.lumley@auckland.ac.nz> |
Description: | The XKCD color survey asked participants to name colours. Randall Munroe published the top thousand(roughly) names and their sRGB hex values. This package lets you use them. |
Imports: | grDevices, FNN |
License: | MIT + file LICENSE |
Index of help topics:
name2color Look up a color by name nearest_named Find nearest named color to a specified color. xcolors List the XKCD survey colors xkcdcolors-package Color Names from the XKCD Color Survey
Author(s)
Thomas Lumley, using data from Randall Munroe and about 2.2e5 survey participants
Maintainer: Thomas Lumley <t.lumley@auckland.ac.nz>
References
http://blog.xkcd.com/2010/05/03/color-survey-results/
Look up a color by name
Description
Look up a color by exact or partial name.
Usage
name2color(name, exact = TRUE, hex_only = TRUE, n = -1)
Arguments
name |
Character string giving color name |
exact |
If |
hex_only |
If |
n |
For partial matching, limit the results to the |
Value
A character string with a hex color code, or a data frame
Author(s)
Thomas Lumley
References
http://blog.xkcd.com/2010/05/03/color-survey-results/
Examples
name2color("green")
name2color("green",exact=FALSE,hex_only=FALSE,n=10)
barplot(rep(1,10), col=name2color("green",exact=FALSE,n=10))
Find nearest named color to a specified color.
Description
Looks up the nearest (sufficiently popular) named color to the specified color
Usage
nearest_named(color, hex_only = FALSE, max_rank = -1, Lab=TRUE)
Arguments
color |
Vector of character strings or matrix of RGB values |
hex_only |
if |
max_rank |
Consider only the |
Lab |
Use the 'Lab' color space if |
Value
A hex string with the color, or a data frame
References
http://blog.xkcd.com/2010/05/03/color-survey-results/
Examples
nearest_named("#8f7303")
nearest_named("#8f7303",max_rank=100)
nearest_named("#8f7303",max_rank=10)
List the XKCD survey colors
Description
Lists (a subset of) the 949 colors consistently identified in the XKCD web color survey.
Usage
xcolors(max_rank = -1)
Arguments
max_rank |
If positive, restrict to the top (most frequently named) |
Value
Vector of character strings
References
http://blog.xkcd.com/2010/05/03/color-survey-results/
Examples
xcolors(10)
name2color(xcolors(10))
barplot(rep(1,10),col=name2color(xcolors(10)))