Inkscape.org
Beginners' Questions making a path split B&W colors halfway
  1. #1
    ken ken @holtsie

    hello,

    Recently I've been using a lot of imported art and if possible, I would like to take a path and make it the color black when over a white background, and white when over a black background. Is this possible or is there an easy way to do it? 

    for example I attached an image to explain. I made the diamond dark Gray so you can still see it over the black. 

    I would like to make the diamond black, and where it crosses over the square, make it white. So it would be half black, half white. I hope that makes sense.

     

     

    Issue
  2. #2
    Ishaan Arora Ishaan Arora @pulsar17

    Hi @holtsie you can achieve this using Path Operations under the Path menu. To make the the specific area white:

    • Select the diamond. (The diamond should be a path for this to work).
    • Duplicate it by pressing Ctrl + D
    • Deselect everything (Click anywhere else on the canvas), then select the diamond (the duplicated one)
    • While the duplicated diamond is selected, select the rectangle and do Path > Intersection
    • You now have just that area of diamond selected that is its own element. You can now change its color to your liking.

    A couple of things to note regarding the condition that the diamond should be a path:

    1. If the diamond is made of only strokes, first do Path > Stroke to Path
    2. If the diamond is group, ungroup it first (Objects > Ungroup) and repeat step 1.
  3. #3
    Polygon Polygon @Polygon🌶

    I think I found an easier way via Division giving the diamond is a shape and not a combined path:

  4. #4
    Polygon Polygon @Polygon🌶

    Cut Path works as well - but you have to rebuilt the result by adding fill color and combine:

  5. #5
    Polygon Polygon @Polygon🌶

    Combine with fillrule= Evenodd:

  6. #6
    Polygon Polygon @Polygon🌶

    On last for now: LPE Boolean Operation. None destructive:

  7. #7
    ken ken @holtsie

    wow ok thank you!

Inkscape Inkscape.org Inkscape Forum Beginners' Questions making a path split B&W colors halfway