Inkscape.org
Beyond the Basics Change Stroke color via Command Line
  1. #1
    paulen1 paulen1 @paulen1

    Hi Folks,

    I'm somewhat new to Inkscape and am trying to convert an .eps to a .png file, which works perfectly so far. Only problem is, I'd like to change the color of all Strokes to a defined one using Inkscape CLI. I'm aware of the possibility to convert the .eps to an .svg and change all stroke colors via "find and replace" in the text, but would prefer doing it in cli with inkscape.

    I also tried using all the filters I could find, including changing contrast/brightness in a way to archieve the correct color (white) but this seems to effect only a limted number of objects in my file.

    Doing it via the Inkscape GUI (select all, change stroke paint to flat color and select white) works fine, and I'm hoping there is a way to do this exact procedure via CLI as well.

    Any help is highly appreciated!

    Thanks!

     

  2. #2
    inklinea inklinea @inklinea⛰️
    *

    object-set-property is what you want.

    Install this extension - it adds a helper extension called "Run Command Line Action"

    https://inkscape.org/forums/extensions/dxf-14-otp/

    You can practise command lines from the gui without having to work blind.

    Then copy and paste whatever works for use with the actual command line.

     

     

    Image 2025 02 28 164501670
  3. #3
    paulen1 paulen1 @paulen1

    Thank you very much, this is indeed exactly what I was looking for. Very useful plugin as well, especially to find the correct syntax for the actions.

     

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Change Stroke color via Command Line