Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 20 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.

Another way:

  1. Select Edit >> XML Editor.
  2. Expand svg:defs >> svg:pattern id="Strips1_1".
  3. Select svg:rect.
  4. Click style.
  5. Set fill to the RGB hex code (including the #).
  6. Click Set to apply the changes.

Set Stripe Colour

share|improve this answer
+1 for the XML editor alternative. I think a lot of people are unaware that this feature is there and how powerful it can be. – Scribblemacher Oct 2 '15 at 11:25

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.
  • To attach the pattern color to a Swatch, replace the fill or stroke color value with the url syntax and the Swatch name. For example, create a swatch named Black then replace with fill:url(#Black) and the pattern's fill color will be tied to the Black Swatch, allowing easy updates 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


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.