Fill object with multiple colors?
-
- Posts: 1
- Joined: Sat Feb 19, 2011 1:57 pm
Fill object with multiple colors?
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?
Re: Fill object with multiple colors?
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.
Re: Fill object with multiple colors?
Hi leveller76,
Welcome to InkscapeForum!
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 (
), then use the Paint Bucket tool (
) 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 (
) 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
). 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
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.....
Welcome to InkscapeForum!

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 (


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 (



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.....

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design