lines and spectrum colors

Post questions on how to use or achieve an effect in Inkscape.
kupsztal
Posts: 2
Joined: Thu Mar 18, 2010 12:20 am
Location: Cambridge, UK

lines and spectrum colors

Postby kupsztal » Thu Mar 18, 2010 12:30 am

How can I create up to 80 (but in principle an N number of) short vertical lines in a such way that their color would represent a light spectrum ?
I am sure this can be done in a simple straightforward way. I tried to experiment with setting a rectangle filled with a grid of colors as a background and starting from this, but I stuck. The final effect would look like a discrete spectrum of light. Something like this: http://www.astronomynotes.com/light/discretbc.gif
Any help is appreciated.
Thanks,
Jakub

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: lines and spectrum colors

Postby prkos » Thu Mar 18, 2010 3:31 am

Do you really need many objects with one color? You can use one large rectangle and create a linear gradient with as many color stops as you need to create a spectrum.

If you really need the many objects solution use the Tiled clones command under Edit. You will need to create a thin rectangle without a stroke and Unset it's fill (it will appear black). Then go to Edit > Clones > Create tiled clones.
Use 1 row and as many columns you need (you'll be able to remove the clones, change settings and try again later if you don't get what you need right away). Symmetry - simple translation, leave everything as it is except the Color tab; change Initial color to red, and change Hue per column to 2%.

You can maybe also achieve it by using Extensions > Generate from path > Interpolate, create lines for major colors in the appropriate position, and choose the With Style option.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

kupsztal
Posts: 2
Joined: Thu Mar 18, 2010 12:20 am
Location: Cambridge, UK

Re: lines and spectrum colors

Postby kupsztal » Thu Mar 18, 2010 3:52 am

Thanks prkos ! That's exactly what I needed (the Tiled clones solution). Good stuff.
I am very impressed with Inkscape. I've been using it for 3 days and already managed to achieve quite a lot.
Jakub


Return to “Help with using Inkscape”