Inkscape.org
Forum Issues, News, and Announcements Changing the color of a pattern
  1. #1
    Scott Hendry Scott Hendry @ScottOz
    *

    Hi everybody:

    I am very new to Inkscape, coming from CorelDraw 10.

    I love this program and it seems to do so much more that my old CDR, but I've been finding a few things that don't work for me ... yet. It may be that I'm just inexperienced and doing the wrong thing.

    I am using Inkscape 0.924

    I am trying to fill an object with a striped pattern. I can fill the object, edit the pattern and using "Objects > Pattern > Obects to pattern Then try to change the black to red.

    What happens is my object turns completely red and I get an error message. What am I doing wrong?

    TIA

    Scott

  2. #2
    brynn brynn @brynn

    Welcome to the forum!

    To fill the object with a stripe pattern:

    • select the object
    • Object menu > Fill and Stroke > Fill tab >

    The pattern which is applied is a black and white stripe pattern.  But you can choose from many patterns in the dropdown menu that you see on the Fill tab.

    If you want anything besides black and white, you'll need to make a custom pattern.  Here's how to do that:

    • draw the pattern that you want, including the color
    • while it's selected, do Object menu > Patterns > Object to Pattern
    • now select the object which you want to fill with the pattern
    • Fill and Stroke > Fill tab >
    • your custom pattern will be represented at the top of the dropdown menu by a random set of 4 digits, so click on that

    And now your object should be filled with your custom pattern.

    Note that you don't have to draw your pattern exactly the right dimensions.  There is a way to edit the pattern after you have applied it to the object.

    • select the object with pattern applied to it
    • switch to the Node tool
    • look around on the canvas for 3 tiny handles - there will be one tiny X, one tiny square and one tiny circle, generally arranged in a triangle, with a handle in each corner

    In recent versions of Inkscape, the pattern handles tend to show up in the top-right corner of the page border (whether it's showing or not) so it might not be anywhere near the actual object.  But in older versions of Inkscape, the pattern handles could be anywhere.  You might have to scroll around to find them, or maybe even zoom out.  

    You can grab the tiny X handle to drag all the handles closer to your object, so it's easier to adjust the pattern when you can see it.  The X handle moves the whole pattern around, so you can adjust it within your object.  The square handle adjusts the size or proportions of the pattern.  Hold the Ctrl key to keep it in proportion.  The circle handle allows you to rotate the pattern (it rotates around the X handle).

  3. #3
    Maren Hachmann Maren Hachmann @Moini

    (resized the image in the first post, as it caused the text to be cut off)

  4. #4
    Maren Hachmann Maren Hachmann @Moini

    Scott, what you are getting is a program crash. This should not happen, and we would like to see it fixed.

    Can you help us find a fix by giving us exact steps how to reproduce the crash in our own Inkscape? If you can share a file that would shorten the number of steps, that would help a lot, too.

  5. #5
    Scott Hendry Scott Hendry @ScottOz

    It should only take a couple of seconds to recreate this:

    Start a new file

    Select the rectangle tool and create a rectangle on the page.

    Select the fill dialog and set the fill to one of the pre made patterns

    Select the node tool

    Select the edit handles for the pattern of the rectangle and try to change the color by clicking any color patch on the bottom of the screen

     

    Thanks for getting back to me on this. I solved my problem by doing as you said, making a custom pattern from scratch.

  6. #6
    Tyler Durden Tyler Durden @TylerDurden

    Not reproduced with 0.92.2, win 8.1.

    Not reproduced with 0.91, Linux Mint.

  7. #7
    Maren Hachmann Maren Hachmann @Moini

    Thanks, Scott.

    Not reproduced with 1.0beta2 (1e49a9bc2a, 2020-01-13). Reproduced with 0.92.x built in August 2019. Currently compiling a more recent one.

    Note that the pattern color cannot be changed by changing the color of the object. You need to edit the actual pattern. To do so, duplicate the object, do Object > Pattern > Pattern to object, edit it, then convert back to a pattern with Object > Pattern > Object to pattern, then use the fill+stroke dialog to apply your new custom pattern to the original object.

  8. #8
    Maren Hachmann Maren Hachmann @Moini

    It's fixed with the latest 0.92.x build (latest code change in it is from January 13th 2020).

  9. #9
    Scott Hendry Scott Hendry @ScottOz

    My apologies, I neglected to tell you my setup config.

    I'm using version 9.2.4 on a windows 64 system.

    I understand pattern handling in Inkscape better now and I will have some suggestions with that. I will look into the proper method for putting those suggestions forward.

     

    thanks again for all the help. The response to my query was very impressive for an open source effort.