Fill object with multiple colors?

Post questions on how to use or achieve an effect in Inkscape.
leveller76
Posts: 1
Joined: Sat Feb 19, 2011 1:57 pm

Fill object with multiple colors?

Postby leveller76 » Sat Feb 19, 2011 2:58 pm

Hi, I am new to Inkscape. And I have a question. Is it possible to fill an object with two colors? I have a project with a map with multiple states and counties. And I have the problem that I need to fill one of the counties with 2 different colors. In books/maps this is usually seen with a diagonal pattern. Is this possible with Inkscape?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Fill object with multiple colors?

Postby druban » Sun Feb 20, 2011 8:54 am

In the fill and stroke dialog box you can choose pattern fill, choose a diagonal stripe, then edit the pattern on canvas to change the colors.
Your mind is what you think it is.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Fill object with multiple colors?

Postby brynn » Sun Feb 20, 2011 9:18 am

Hi leveller76,
Welcome to InkscapeForum! Image

Do you mean that you want to fill that county/shape with 2 solid colors with a diagonal line dividing them? Or do you mean that you want to fill it with a pattern of diagonal stripes? Inkscape can easily do both!

If it's the first, all you need to do is draw a diagonal line with the Pen tool ( :tool_pen: ), then use the Paint Bucket tool ( :tool_paintbucket: ) to fill each side.

If it's the 2nd, then select the shape, open the Fill and Stroke dialog, and click the button that displays a diamond pattern. This will automatically fill the county/shape with a black and white, vertically striped pattern. To make it diagonal, you'll need to switch to the Node tool ( :tool_node: ) and look in the top, left corner of the page. It will help to find this if you have the page border visible (which it is by default, so if you've turned it off, you'll know how to turn it back on :mrgreen: ). I do not know why in the world Inkscape is made to display the pattern handles in the corner of the page, instead of in the corner of the shape, but in any case, you'll find a tiny X, tiny circle and tiny square. Using the node tool, you can drag the X and bring the controls closer to the shape, to make it easier to adjust and see what you're doing at the same time :P

Drag the circle to make the stripes diagonal. And you can drag the square to make more, thinner stripes or fewer, thicker stripes. If you want something besides black and white, there are a few options to consider. You can use the paint bucket tool to quickly color the stripes. Actually you can draw anything you want and convert it to a pattern. So you can create your own unique pattern to be used here. Although if this pattern is to be used in this county/shape, and never again, you may as well just draw in your own stripes, rather than convert it to a pattern. (Not that converting to a pattern takes more than a single click, lol!) Object menu > Pattern > Object to Pattern.

One last question -- Your map is already in the SVG format, right? If it's not, you'll need to use Path menu > Trace Bitmap, to convert it to SVG. Please see Help menu > Inkscape Manual (with internet connection) and look up instructions for that dialog. But if you run into trouble, please don't hesitate to reply back and we'll be glad to help you work it out.

Darn it, druban beat me to the post! But I'll post anyway.....:D


Return to “Help with using Inkscape”