handyfloss

Because FLOSS is handy, isn’t it?

Inkscape tip: make arrow head’s color match that of its body

Posted by isilanes on July 16, 2007

Blog moved to: handyfloss.net

Entry available at: handyfloss.net/2007.07/inkscape-tip-make-arrow-heads-color-match-that-of-its-body/

I have encountered the problem more than once, and it is a bit annoying to say the least. Basically, when you build a path/arrow in Inkscape, it starts as a black curve by default. You can edit it to put a marker in either or both ends (Click on the curve, then Object->Fill and Stroke->Stroke Style), to make an arrow, for example.

Now, the problem is that if you change the color of the body of the arrow, the head will remain black, as documented, for example, in A Guide to Inkscape, by Tavmjong Bah. Not nice, uh? The solution is given in the same site, and consists on using a plugin. To do so, select: Effects->Modify Path->Color Markers to Match Stroke.

If you are a Debian user, you might encounter a problem: a window pops up saying The inkex.py module requires PyXML. This has been reported as a bug, and also happens for Ubuntu. The solution is to install the python-xml package, which is not always installed by default when you install Inkscape, it is just “suggested”. This means that when you install Inkscape (aptitude install inkscape), aptitude will tell you something like “The package python-xml is recommended, but it is not going to be installed”, and will go on happily. If (like me) you ignore the suggestion, you will not have the python-xml package installed, and some extensions, like the above, will not work (however this allows the users that do not want to use the plugins to have a lighter instalation, if they so wish).

About these ads

29 Responses to “Inkscape tip: make arrow head’s color match that of its body”

  1. Anonymous said

    Hello
    Can you tell me please, in which version of Inkscape the Effects menu apears ? I tried to follow your advice but i can’t find the Effects menu. I’m using Inkscape 0.43 for Windows XP
    Thank you,
    Ervin

  2. Iñaki Silanes said

    I can not assure what is the earliest version in which I’ve seen it. The Etch release of Debian (stable) has Inkscape 0.43 too (DistroWatch seems to say that it’s 0.44, but my package manager says 0.43), but I am using Lenny (testing), with Inkscape 0.45.

    Inkscape 0.45 certainly does have a “Effects” menu (between “Text” and “Whiteboard”). I’d swear 0.43/0.44 also had it, but memory might be failing…

    I’m so glad to hear of someone using free software tools on Windows. I hope Inkscape is doing fine for you. Let me strongly encourage you to try Linux. I use Debian, and with it keeping the latest version of the programs installed is a breeze.

  3. Anonymous said

    Thanks for the tip.

    I liked Inkscape very much exactly because it is quite intuitive and simple. But this trick is just horrible.

    Anyway, your tip helped a lot.

  4. JMotard said

    Thanks , suggestions worked well (change arrow head collor through plug in)

  5. Thanks for the tip!

    BTW, on Ubuntu 8.04 (hardy) I had to install the python-lxml package rather than python-xml.

  6. isilanes said

    Thanks for your contribution, Jamie (and others).

    Recall that this blog has moved to handyfloss.net.

    You can follow this entry there at Inkscape tip: make arrow head’s color match that of its body.

  7. David Bond said

    ICK, but thanks!

  8. William said

    Thanks a whole heap I’d struggled away with this one for a while. Amazing.

  9. osfight.de said

    thanks dude, worked for me like a charm. (restart of inkscape is necessary…)

  10. Alex said

    Perhaps an easier way is to (while with the arrow selected) select “Path” then “Stroke to path” to translate the whole arrow into a path rather than a line segment. You can then set the whole thing to whatever colour you want.
    Not a perfect solution (some arrow heads still have a black border) but good enough for most of my purposes.

    • Anonymous said

      You could also: right click the line with the arrow head -> set mask -> and color the mask with the paint bucket. This will create another object over the arrow. You can adjust this new object (lets say create a white arrow with a black border around it).

  11. Miguel Silva said

    Thanks for the tip!!!

  12. Anon said

    There is a “hard” XML editing way for machines that are missing the necessary package for the much simpler plugin: http://tavmjong.free.fr/INKSCAPE/MANUAL/html/XML-Examples.html#XML-Examples-ColorMarker .

  13. Martin said

    Thanks, works!

  14. Sarah said

    Thanks for the clear and complete description/instructions!

  15. A inkscape tip (about arrow tips)…

    If you are working with Inkscape, and if you want nice SVG graphics you should be using inkscape, you may have notice that when you add a path/arrow with a tip, and then you want to change the color of the arrow, the head will remain using the old colo…

  16. Kos said

    Thanks a lot, Iñaki! A very useful tip!

  17. aj said

    Hello,

    I’m using Inkscape 0.47 on Ubuntu and have come to love it.

    My solution on this version is:
    ->Extensions Menu
    ->Modify Path
    ->Colour markers to match stroke.

    -aj

  18. My fix is what Aj said.

    Inkscape is great for “power users” like myself, but things like this are going to scare away a large number of average users. It’s not obvious what advantage this behavior gives.

  19. sciencebuz said

    Thanks – this tip is genius – have been struggling to colour arrowheads for a while now!

  20. scratchrus said

    thank you very much for the hint!

  21. Hans Linkels said

    Man, you saved my day. I am creating a series of complicated objects where I have to resize and rotate vectors all the time. To get the colors right, I had to use little triangles, which I had to ungroup and regroup all the time during resizing and rotating. With the usual errors and unnecessary redos of course. You need a BIG thank you for this.

    jlinkels

  22. Anonymous said

    Hi folks,

    I found a solution and posted in my blog: http://www.rodrigoguarischi.com/inkscape-arrowhead-color-bug/

    Bye

  23. Anonymous said

    In some versions you have to select Extensions>Modify Path>Color Markers to Match Stroke

  24. Anonymous said

    Ok, i just tried to install python on my mac. It still does not work. Going back to use powerpoint…

  25. Christian said

    Just for people who start by reading from the top: For version 0.48, the problem is solved as explained by Anonymous on Nov. 28, 2012.

  26. CLS said

    I am on ubuntu 12.04 using inkscape 0.48 on March 2014, and I still have the problem (and the suggested fix does work for me, thanks !!)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: