Description Usage Arguments Value Examples
Display colours in a collection
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | showColors(fill, ...)
## Default S3 method:
showColors(
fill,
labels = if (length(fill) <= 25) { if (!is.null(names(fill)))
names(fill) else fill } else NA,
border = colour,
colour = color,
color = if (length(fill) <= 20) "grey" else "transparent",
edges = 1000,
radius = 1,
...,
n = length(fill)
)
## S3 method for class ''function''
showColors(fill, ..., n = 20)
showColours(fill, ...)
|
fill |
either a palette function or a vector of colours to display |
... |
arguments to be passed on to methods |
border, colour, color |
alternative names to use for the colour of the borders |
edges |
integer: no of edges to use for the inner circle |
radius |
numeric: value to use for the radius of the circular display |
n |
number of colours to use for a palette display |
the vector of colours used in the display, invisibly.
1 2 3 4 | showColors(pal_desert)
pal <- myPalette(pink, beige, 'sky blue')
showColours(pal)
showColours(pal, n = 50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.