Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

How can I color a pattern in Inkscape without creating a custom pattern? I guess this should be possible. But I can't manage this :-(

I draw a square. --> I get a square filled with a color (green). Then I choose a standard pattern for the square. Green is gone and I have a black pattern. Now I would like to change the pattern's color. How can I do this?

pattern and stroke in Inkscape

share|improve this question

3 Answers 3

up vote 14 down vote accepted

The easiest way I figured out is probably this:

  1. Draw a figure.
  2. Select the pattern from Fill and Stroke ("Füllung und Kontur").
  3. Click Extensions > Colour > Replace colour .. (should be something like Erweiterungen > Farbe > Farbe ersetzen in German).
  4. Enter the hex code for your desired colour.
share|improve this answer

If, like me, you're unable to use any extensions due to multiple incompatible python installations (not an uncommon problem) it's still possible, but best in a simple file (and much easier if you don't save optimised SVG,which you can't without extensions):

  • Set the pattern you want for the object you want
  • Save the file
  • Open it in a decent text editor (notepad++ works nicely on windows, especially if you tell it to use XML syntax highlighting for .SVGs).
  • Find the pattern definition near the top of the file (if you only have 1, search for "pattern").
  • Look for the next line with style="fill:????;stroke:????" /> (in my case fill:black).
  • Select down to the bottom of the pattern definition.
  • Find/replace all within selection: Find the original fill colour, replace with the new one, e.g. Find black, replace #808080 and you'll get grey.
  • Save and reopen in inkscape.
share|improve this answer

By example:

Suppose you made a circle and you want its fill pattern to be green vertical bars.

  1. Make a thin green rectangle somewhere in some blank space (size is irrelevant).
  2. copy the green rectangle. Position the copy some reasonable distance to the right (this will be the relative spacing of your pattern).
  3. select the two green rectangles and press Alt + I (hotkey for "object --> pattern --> object to pattern").
  4. select the circle. when you go to fill pattern, there will now be a custom pattern in the drop-down menu. e.g. "pattern7165". select this pattern.
  5. Now you've got green vertical bars!
  6. (you may now delete the two rectangles that served as the template for the pattern).
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.