Build a dark-mode variant of a PNG image by replacing every colour channel
with its RGB complement. The alpha channel is kept as it is, so a
transparent background stays transparent.
Usage
invert_png(path, output = NULL, quiet = FALSE)
Arguments
- path
Path to the input PNG file.
- output
Path of the output PNG. Defaults to the input name with a
-dark suffix next to it.
- quiet
Whether to suppress the message about the written file.
Default is FALSE.
Value
The output path, invisibly.