name2color {xkcdcolors} | R Documentation |
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))
[Package xkcdcolors version 1.0 Index]