Most of the Fill Patterns have a transparent background, and it allows for changing the pattern color (foreground). Is there a way to change the background color?
Right now I'm duplicating the object, filling the 2nd with the color I need for the background, stacking and grouping them together. It works, but it's kind of dumb way. Hopefully, there is an easier and more straightforward way.
Select the pattern filled object (let's say it's name is path23). Copy it
Draw any path with bezier tool, for example. In object's panel, move it under the pattern filled object.
Add it a clone original LPE, click on clipboard icon and untick Allow transforms option.ย Give a handy name (path23_background for example), give it the color fill you wish and lock it (locker icon) : it won't be selectable on canvas, but will be selectable via object's panel.
Another more complicated way is to add to its pattern a colored background (using xml editor in defs). But then its color will have to be modified in xml editor, not that handy.
Note that you'd probably better work with geometric bounding boxes (inkscape preferences > tools).
Draw a rectangle (its size doesn't matter) give it the pattern fill you want to add a background.ย Then do object > pattern to object.
If you don't see where the result (generally many paths) is on canvas, type "3" with numpad. Note the size of the bounding box (all resulting paths stay selected).
Draw a rectangle (with no stroke and the fill color you want) with the same dimensionsย place it behind the resulting paths), select them all and redo pattern (object > object to pattern). The new pattern will now be displayed in fill and stroke panel.ย
First solution will generate a svg file that contains informations specific to inkscape, you'll need to flatten the lpe before saving for use with orher svg softwares.
Thank you for the replies. I liked the 1st option better. I'm a beginner and only use Inkscape only eventually; it took me some time to find my way around the icons/menus, but it worked. However, it still has 2 objects.
The workaround I was using, was to duplicate the object, fill the duplicated object with the background color I needed, and then group the 2 objects.
I noticed that when duplicating the object from your approach, Inkscape is only duplicating the top object, i.e., it loses the background color on the duplicated object. When duplicating the group based on my approach, Inkscape duplicates the whole thing.
I hope changing the background color of the pattern becomes a feature shortly.
Hi Folks!
Most of the Fill Patterns have a transparent background, and it allows for changing the pattern color (foreground).
Is there a way to change the background color?
Right now I'm duplicating the object, filling the 2nd with the color I need for the background, stacking and grouping them together. It works, but it's kind of dumb way. Hopefully, there is an easier and more straightforward way.
Thank you!
Not that straightforward...
The quickest way IMHO :
Allow transforms
option.ย Give a handy name (path23_background for example), give it the color fill you wish and lock it (locker icon) : it won't be selectable on canvas, but will be selectable via object's panel.Another more complicated way is to add to its pattern a colored background (using xml editor in defs). But then its color will have to be modified in xml editor, not that handy.
The other way :
Note that you'd probably better work with geometric bounding boxes (inkscape preferences > tools).
First solution will generate a svg file that contains informations specific to inkscape, you'll need to flatten the lpe before saving for use with orher svg softwares.
Hi David248,
Thank you for the replies.
I liked the 1st option better. I'm a beginner and only use Inkscape only eventually; it took me some time to find my way around the icons/menus, but it worked. However, it still has 2 objects.
The workaround I was using, was to duplicate the object, fill the duplicated object with the background color I needed, and then group the 2 objects.
I noticed that when duplicating the object from your approach, Inkscape is only duplicating the top object, i.e., it loses the background color on the duplicated object.
When duplicating the group based on my approach, Inkscape duplicates the whole thing.
I hope changing the background color of the pattern becomes a feature shortly.
Cheers!