Piece of a rainbow

Post questions on how to use or achieve an effect in Inkscape.
Kennin
Posts: 31
Joined: Fri Mar 18, 2016 2:54 am

Piece of a rainbow

Postby Kennin » Sat Mar 30, 2019 2:07 am

I am trying to fill a small piece of a ring with the colours of the rainbow. It should look as if a piece of a rainbow has been cut out.
I just need to have six basic colours, no gradients... But I can't even imagine how I should begin to create this effect.
Been trying over and over again to fix this.

I even tried to make it in a pixelpainter and trace the bitmap... but the result was abominable, as you can imagine.
Attachments
Slice.svg
(2.58 KiB) Downloaded 105 times

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

Re: Piece of a rainbow

Postby druban » Sat Mar 30, 2019 1:36 pm

There are two ways to do this: one is to use the gradient tool to make a circular gradient with hard edge transitions (look at the attached svg to see how to arrange the gradient nodes) and the other way is to use the interpolate extension to create six overlapping objects colored with the rainbow colors. I have attached pics and an svg to show how it's done, and hopefully they will be sufficient explanation.
This is the result of the gradient fill. The SVG attached will show how the gradient nodes and shape were arranged.
rect1524.png
rect1524.png (13.11 KiB) Viewed 932 times


SectorInterp.png
SectorInterp.png (188.64 KiB) Viewed 932 times


At step 5, instead of using the Interpolate extension, you can choose the alternate route of doing PATH>COMBINE on the two paths, then doing PATH EFFECT>Interpolate sub-paths. The result will then have to be converted back to individual paths by doing OBJECT TO PATH and PATH>BREAK APART.
Since you will be coloring each object individually and reordering them in either case there is no big advantage in which method you choose.

Edit: There are actually many ways to achieve this result in Inkscape, not just two, before someone tells me how wrong I am to show just two. Yes, you can use Bend, Pattern, Mesh, Envelope etc. etc. as well.
Attachments
Slicegradient.svg
(5.43 KiB) Downloaded 99 times
Your mind is what you think it is.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Piece of a rainbow

Postby tylerdurden » Sun Mar 31, 2019 4:04 am

It could be fun to see how many ways...

Image
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Kennin
Posts: 31
Joined: Fri Mar 18, 2016 2:54 am

Re: Piece of a rainbow

Postby Kennin » Mon Apr 01, 2019 9:04 am

Thanks for the heads up! I'll experiment with those! :)


Return to “Help with using Inkscape”