how to imitate 'hue' blending using filters?

Post questions on how to use or achieve an effect in Inkscape.
tester21
Posts: 14
Joined: Wed Nov 25, 2015 7:38 pm

how to imitate 'hue' blending using filters?

Postby tester21 » Mon Dec 21, 2015 4:59 am

From what I see, there are some blending modes, few are missing or can't find them.

In paintshop pro, there is a blending mode called "hue". In inkscape, I can get similar results using filters applied to (bitmap) objects directly. THe problem is, that results are similar, but not that good enough, and I'm not sure how to aproach it.

An example. If in psp, I have a red rectangle that covers a bitmap, and do a blending in "hue" mode, then colors shift appropriately towards red (but white background parts remain respectively white).

Mathematically/technically - which filters should I use in inkscape (or how to configure a filter), to get such output effect? Is this a matter of only a "color shift" routine or something else should be added (due to poor results in inkscape) to get more mono-color effect?

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: how to imitate 'hue' blending using filters?

Postby v1nce » Mon Dec 21, 2015 11:49 pm

short answer: you can't
long answer:this would require to go to the HSL color domain and back which filters are not -practically- designed for

send complaints to svg working group so that they add the hue to the supported blend modes by SVG.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: how to imitate 'hue' blending using filters?

Postby Lazur » Tue Dec 22, 2015 7:45 am

Now how about this idea.

Group the objects you want to affect with a hue blending effect,
duplicate the group,
apply a colorize filter to the duplicant with the desired colour,
and mask the duplicant group above the unfiltered one to add a fade effect.
Might not be perfect if the original group has transparency -like put an opaque rectangle to the bottom as a background object to the group to make it better- but maybe worth a try.
(If you don't want to save your work as pdf or display it with a browser etc.)

tester21
Posts: 14
Joined: Wed Nov 25, 2015 7:38 pm

Re: how to imitate 'hue' blending using filters?

Postby tester21 » Tue Dec 22, 2015 11:45 pm

At the moment, I resigned from color filters (and use imgs re-rendered externally), because they behave a bit buggy. Some features are not remembered after reloading the file/inkscape, and they update when clicking on some node in filter editor (or in opposite way - colors are correct after adding filter, but when clicking on nodes in editor, display changes - and does not go back).

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

Re: how to imitate 'hue' blending using filters?

Postby brynn » Wed Dec 23, 2015 12:51 am

I only vaguely understand this issue. But isn't this what Colorize filter does? Or maybe Color Shift? Maybe more Color Shift?

Filters menu > Color > Colorize
Filters menu > Color > Color Shift

Well, a lot of those filters in the Color category sound like they might do something like what you're asking.

tester21
Posts: 14
Joined: Wed Nov 25, 2015 7:38 pm

Re: how to imitate 'hue' blending using filters?

Postby tester21 » Wed Dec 23, 2015 3:09 am

I was thinking to migrate some of my pojects from paintshop to inkscape due to presence of vectors. But:

1) I'm unable to replicate color masks in a repeatable way. Repeatable way is, when you use the same and again the same routine, and you just adjust/shift few parameters. It could be done by blending config for layers, but there are not enough choices for blending in inkscape.

2) filters in inkscape are not stable/predictable, i.e. they tend to display different things, although nothing was changed (and this affects exports to other formats, like png).

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

Re: how to imitate 'hue' blending using filters?

Postby brynn » Wed Dec 23, 2015 6:55 am

Well, as far as I understand, Inkscape's blending modes are an attempt to provide some basic raster effects. But Inkscape is a vector editor first.

Of course, new filters and/or extensions are always welcome. But you got some advice from 1 of our Inkscape filters masters (v1nce) on the subject of making a new filter for this.

It sounds like you might be better off using a raster editor for the blending, and Inkscape or other vector editor for the vectors.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: how to imitate 'hue' blending using filters?

Postby Moini » Wed Dec 23, 2015 7:28 am

It's got nothing to do with raster vs. vector - it's just that the current SVG specs do not support other blending modes via feBlend (filters), like v1nce wrote. But it's possible via CSS styles (mix-blend-mode, not sure if Inkscape would render that, though - probably not...)

There's a W3C draft / recommendation (not a standard) that introduces more modes:
http://www.w3.org/TR/compositing-1/#mix-blend-mode , including the hue blend mode.

The CSS blend modes seem to work with inline SVG, according to this article: https://css-tricks.com/basics-css-blend-modes/ .
Also see http://www.jeromecukier.net/blog/2015/0 ... e-and-svg/
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: how to imitate 'hue' blending using filters?

Postby Lazur » Wed Dec 23, 2015 7:54 am

So how about this one?:

Image


edit -another variant

Image

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

Re: how to imitate 'hue' blending using filters?

Postby brynn » Sat Dec 26, 2015 5:48 am

Ok, this probably isn't what you want either, but I just noticed Extensions menu > Color > HSL Adjust. So you could adjust the hue there (and leave the S and L alone). I guess it's not really blending.... But just to mention it.


Return to “Help with using Inkscape”