Description Usage Arguments Details Value Author(s) Examples
For each color in col
create as many shades as indicated by the value
of reps
at the corresponding index by grading towards 'white' - the
shades are going scale
of the way to white/black.
1 2 3 4 5 6 7 8 9 | color.shades(
reps,
col = col.fun(length(reps)),
scale = ifelse(direction == "bright", 0.7, 0.5),
gscale = TRUE,
direction = c("all", "bright", "dark"),
col.fun = default.hcl,
...
)
|
reps |
vector of repetitions |
col |
color vector; must be a valid argument to |
scale |
how much of the range to black/white should be covered |
gscale |
global shade steps? |
direction |
which way to build the shades, see Description |
col.fun |
function to calculate default colors |
... |
passed to |
If col
is provided and reps
is scalar it is recycled to the
length of col
, otherwise it is filled with ones should
it be shorter than col
.
The shades can be constructed either towards white, black, or, symmetrically.
This is determined by setting direction
to 'bright', 'dark', or 'all',
respectively. The latter is the default.
When gscale
is TRUE, all shade steps are the same, independent
of the individual repetitions, otherwise each shade range covers the range
given by scale
.
Color matrix with on entry per column
Benno Pütz puetz@psych.mpg.de
1 2 | color.shades(3, c('red', 'blue'))
show.shades(color.shades(2:4, c('red', 'green', 'blue')))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.