colour_manip | R Documentation |
These are a set of convenience functions for standard colour manipulation operations.
col_shift(col, amount = 10)
col_lighter(col, amount = 10)
col_darker(col, amount = 10)
col_saturate(col, amount = 10)
col |
A character vector of colours or a colour palette function. |
amount |
A numeric vector giving the change. The interpretation depends on the function:
|
col_shift()
considers the hue channel to be periodic, so adding 180 to
a colour with hue 270 will result in a colour with hue 90.
A vector of colours.
Other colour manipulation:
alpha()
,
col2hcl()
,
col_mix()
,
muted()
col_shift("red", 180) # teal
col_lighter("red", 50) # light red
col_darker("red", 50) # dark red
col_saturate("red", -50) # brick-red
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.