Representing two or more overlaid linear gradients

Post questions on how to use or achieve an effect in Inkscape.
Edwardhardy
Posts: 5
Joined: Tue Mar 13, 2012 5:17 am

Representing two or more overlaid linear gradients

Postby Edwardhardy » Tue Mar 13, 2012 5:22 am

I need to produce a style guide for a dev team.

For some of my linear gradients, I have used 2 or more linear gradients laid on top of each other. However, I want to simplify things for the dev team and just provide details of ONE gradient. Is there a simple way for me of perhaps merging the gradients so that many become 1?

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

Re: Representing two or more overlaid linear gradients

Postby brynn » Tue Mar 13, 2012 6:17 am

Welcome to the forum!

I can't think of a simple way to do this. But more than anything, I'm curious why you would overlay more than one gradient, instead of just using one?

As for achieving one from the more than 1, I'm not sure. You could export a PNG, to more or less "flatten" it. Then you could use Inkscape's Dropper tool to acquire the beginning and ending colors. But if it's a complex gradient (which I can only imagine it must be), or even a simple one with more than just the beginning and ending colors (for example strips or bars) that might be hard to do. I guess you could probably do it that way, and just use the dropper tool at each major color. Then transfer that color to the stops in a new gradient. But it won't be anything close to a precise reproduction.

Oh, better idea.....maybe..... Start as before and export a PNG (File menu > Export Bitmap, not cairo png). Then import back into Inkscape and use Path menu > Trace Bitmap. You will have to fidget with the settings to get as precise a color as you can (usually large number of scans). However, that won't work at all, now that I think about it. Because instead of a gradient, you'll get a bunch of partially overlapped objects, possibly with varying transparency. So no, nevermind. Dropper tool is still my best idea. (But I'll leave this comment in case it might lead someone else to a clue for something better.)

Hhhhmm.....somehow, the gradient must have some kind of definition. But even in the XML Editor, where the data is stored as text, it's still just called a gradient.

Maybe someone else will have some ideas?

Edwardhardy
Posts: 5
Joined: Tue Mar 13, 2012 5:17 am

Re: Representing two or more overlaid linear gradients

Postby Edwardhardy » Tue Mar 13, 2012 7:51 pm

Thanks so much for your fullsome and rapid reply.

You're actually way ahead of me, here. I am just creating simple one colour -> one colour gradients.

However, sometimes I have built up the design by overlaying one gradient over another. Its just my way of working - a creative thing!

The downside is that I can't merge these gradients into a single one, so, yes, the dropper tool is probably the way to go. Thanks very much.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Representing two or more overlaid linear gradients

Postby Xav » Wed Mar 14, 2012 2:10 am

brynn wrote:You could export a PNG, to more or less "flatten" it. Then you could use Inkscape's Dropper tool to acquire the beginning and ending colors.


Brynn, there's probably no need to flatten the image. The dropper will pick up on whatever colour is visible on screen - even if that colour is the result of several translucent elements being overlaid on each other.

But if you do want to temporarily "flatten" a particular collection of objects, just select them all and use Edit > Make a Bitmap Copy to get a flattened bitmap version on the canvas, rather than having to deal with exporting to a new file.

One other useful hint that a lot of people don't know about the dropper tool, but which can be handy sometimes: if you click with it you'll pick up the colour of the pixel you clicked on, but if you click and drag you can draw out a circle - the selected colour will be the average colour of all the pixels enclosed by the circle.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter


Return to “Help with using Inkscape”