invert_color {ggdark} | R Documentation |
Invert color(s)
Description
Invert a vector of colors, provided the colors are valid hex codes or have valid names (i.e., they belong to base::colors()), and return a vector of inverted colors in hex code.
Usage
invert_color(color, colour = color)
invert_colour(color, colour = color)
Arguments
color |
color(s) to invert |
colour |
alias of color |
Value
Inverted color(s) in hex code
Examples
invert_color("white") # "black"
invert_color("gray20") # "gray80"
invert_color("grey80") # "grey20"
invert_color(c("#000000", "#333333")) # "#FFFFFF","#CCCCCC"
[Package ggdark version 0.2.1 Index]