hypo_recolor_svg redefines the color of a specific svg layer.

hypo_recolor_svg(svg, layer = 1, color = "darkgray")

Arguments

svg

svg object (manatory), the svg object

layer

integer skalar (optional), the layer to recolor

color

string skalar (optional), the new color

Details

This function redefines the color of a specific svg layer. The svg needs to be read in by hypo_read_svg.

Examples

svg_file <- system.file("extdata", "logo.c.svg", package = "hypoimg") svg <- hypo_read_svg(svg_file) svg_new <- hypo_recolor_svg(svg, color = 'red') ggplot() + annotation_custom(grob = svg_new)