Change Color of Icon with R (!) magick
Goal I have a couple of icons (technically sRGB but mostly black-ish or white-ish with a transparent background). I want to change the color to darkblue (say). My attempt Input Pic Code library(magick) pic <- image_read(file.path(system.file(package = “magick”), “images”, “shape_rectangle.gif”)) ## find dark spot and use `image_fill` pixels <- pic |> image_data() |> as.integer() (idx […]