How to apply relative color changes to multiple objects?
How to apply relative color changes to multiple objects?
Say I have a number of objects, lets say 50 objects with different Lightness and I want to apply +10 to brightness to them all. Is this possible in Inkscape? If not I would think it a high priority. Well, at least for me it would save A LOT of time.
Example:
object 1: Lightness 50
object 2: Lightness 43
object 3: Lightness 67
Adding +10 Lightness to these objects in one action/one command would then change it to:
object 1: Lightness 50 + 10 = 60
object 2: Lightness 43 + 10 = 53
object 3: Lightness 67 + 10 = 77
Also, I am aware of Extensions -> Color -> 'Brighter', but that is a very slow way to increase brightness. Also 'Brighter' is increasing brightness by some preset value which seems to be sometimes a bit of +Saturation and some value +Lightness(not always the exact same amount(?)), and there is no where to change the incremental value. Even if there were it would seem a cumbersome way to do it, and, it is changing total brightness and not just Lightness. I am wondering why there is not just a slider function for adding values to objects attributes, just as there is a slider to change color attributes for HSL in the "Fill and Stroke" window?
Example:
object 1: Lightness 50
object 2: Lightness 43
object 3: Lightness 67
Adding +10 Lightness to these objects in one action/one command would then change it to:
object 1: Lightness 50 + 10 = 60
object 2: Lightness 43 + 10 = 53
object 3: Lightness 67 + 10 = 77
Also, I am aware of Extensions -> Color -> 'Brighter', but that is a very slow way to increase brightness. Also 'Brighter' is increasing brightness by some preset value which seems to be sometimes a bit of +Saturation and some value +Lightness(not always the exact same amount(?)), and there is no where to change the incremental value. Even if there were it would seem a cumbersome way to do it, and, it is changing total brightness and not just Lightness. I am wondering why there is not just a slider function for adding values to objects attributes, just as there is a slider to change color attributes for HSL in the "Fill and Stroke" window?
Re: How to apply relative color changes to multiple objects?
Hello,
I was going to say to use the menu Extension > Color > Bright, but you don't have much control in it. Well, I'm using Inkscape 0.48 right now. Maybe in 0.91 that have been fixed (Maybe some one could check?).
In the Color extension sub-menu there is custom control, but it only uses RGB values. But as far i understand, Inkscape converts from/to RGB values to/from HSL.
http://tavmjong.free.fr/INKSCAPE/MANUAL ... lor-Custom
Since SVG files can be seen by text editors, a script program (like python) could change those values.
I was going to say to use the menu Extension > Color > Bright, but you don't have much control in it. Well, I'm using Inkscape 0.48 right now. Maybe in 0.91 that have been fixed (Maybe some one could check?).
In the Color extension sub-menu there is custom control, but it only uses RGB values. But as far i understand, Inkscape converts from/to RGB values to/from HSL.
http://tavmjong.free.fr/INKSCAPE/MANUAL ... lor-Custom
Since SVG files can be seen by text editors, a script program (like python) could change those values.
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: How to apply relative color changes to multiple objects?
Hi.
According to http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Extensions-Color.html#Extensions-Color-MoreLight, more light extension adds 105% more brightness by default.
Probably it wouldn't take too much modification of the .py file, to increase that value.
Other than that, if all brightness values were more than 127, putting a white rectangle on top and changing its opacity would result something close.
According to http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Extensions-Color.html#Extensions-Color-MoreLight, more light extension adds 105% more brightness by default.
Probably it wouldn't take too much modification of the .py file, to increase that value.
Other than that, if all brightness values were more than 127, putting a white rectangle on top and changing its opacity would result something close.
Re: How to apply relative color changes to multiple objects?
Ha ha,
you edited your message!
... anyway, please check mine anyway, the new version of inkscape, or a conversion from RGB to HSL (or other)
other idea: Filters can also be used.
Edit after Lazur response:
Oh well... just to increase the bet: you can control the SVG with CSS, but I haven't tried yet
No, it's not possible... in the way you want
you edited your message!
... anyway, please check mine anyway, the new version of inkscape, or a conversion from RGB to HSL (or other)
other idea: Filters can also be used.
Edit after Lazur response:
No, it's not possible... in the way you want
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: How to apply relative color changes to multiple objects?
hulf2012 wrote:Hello,
I was going to say to use the menu Extension > Color > Bright, but you don't have much control in it. Well, I'm using Inkscape 0.48 right now. Maybe in 0.91 that have been fixed (Maybe some one could check?).
In the Color extension sub-menu there is custom control, but it only uses RGB values. But as far i understand, Inkscape converts from/to RGB values to/from HSL.
http://tavmjong.free.fr/INKSCAPE/MANUAL ... lor-Custom
Since SVG files can be seen by text editors, a script program (like python) could change those values.
I use 0.48; I should have written that to begin with of course. Yes unfortunately 'Brighter' extension is a bit cumbersome to use. However it's still useful enough; I am using it now and it get's the job done, just.. not very quickly. But I believe that from the current possibilities that is what I will go with. I'd still much prefer a sliding function, would be much more intuitive.
I'd wish I was able to program extensions, I'd make a sliding function to add HSL values right on the spot

Re: How to apply relative color changes to multiple objects?
You might get the desired result with the Filters/Color/Lightness-Contrast and then, in Filter editor, adjust the flood color to black, white, gray or even some other color. Individual settings for each object will be preserved.
Re: How to apply relative color changes to multiple objects?
Hi
Quote from the filter-master! - Maestral,
Using the filter does not change the "original" SVG?
To make an extension with a slider is relatively simple, why is a slider "more productive" than a number input?
(You can have both!)
Let's fire up the text editor and start coding - the race is on!
RGDS
Ragnar
Quote from the filter-master! - Maestral,
You might get the desired result with the Filters/Color/Lightness-Contrast
Using the filter does not change the "original" SVG?
To make an extension with a slider is relatively simple, why is a slider "more productive" than a number input?
(You can have both!)
Let's fire up the text editor and start coding - the race is on!
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: How to apply relative color changes to multiple objects?
ragstian wrote:Hi
Quote from the filter-master! - Maestral,You might get the desired result with the Filters/Color/Lightness-Contrast
Using the filter does not change the "original" SVG?
To make an extension with a slider is relatively simple, why is a slider "more productive" than a number input?
(You can have both!)
Let's fire up the text editor and start coding - the race is on!
RGDS
Ragnar
I guess it would only be more productive if the changes would happen almost realtime. The 'Brighter' extension takes several seconds to apply some saturation and lightness to even a small number of objects and that is perhaps my biggest problem and I find that a bit odd? Just adding lightness or saturation to one simple non grouped object is very very quickly done with the HSL slider. Why is the 'Brighter' extension then so slow?
Re: How to apply relative color changes to multiple objects?
Hi
All the extensions use a program external to Inkscape. Most extensions that follow Inkscape are written in Python.
When you "start" an extension the Python interpreter has to be started,
the interpreter loads the extension code, the code is then excecuted.
Most of the "delay" you see is most likely from the start & load.
My extension (with slider) works just as slow as the original brighten extension.

No point in "releasing" the extension if speed is your ultimate goal.
Might be an idéa to submit a "feature request" to the development team?
RGDS
Ragnar
All the extensions use a program external to Inkscape. Most extensions that follow Inkscape are written in Python.
When you "start" an extension the Python interpreter has to be started,
the interpreter loads the extension code, the code is then excecuted.
Most of the "delay" you see is most likely from the start & load.
My extension (with slider) works just as slow as the original brighten extension.

No point in "releasing" the extension if speed is your ultimate goal.
Might be an idéa to submit a "feature request" to the development team?
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: How to apply relative color changes to multiple objects?
ragstian wrote:Hi
All the extensions use a program external to Inkscape. Most extensions that follow Inkscape are written in Python.
When you "start" an extension the Python interpreter has to be started,
the interpreter loads the extension code, the code is then excecuted.
Most of the "delay" you see is most likely from the start & load.
My extension (with slider) works just as slow as the original brighten extension.
No point in "releasing" the extension if speed is your ultimate goal.
Might be an idéa to submit a "feature request" to the development team?
RGDS
Ragnar
I see. Yes, I really think this should be a feature built in Inkscape. I find it hard to believe that adding brightness and saturation to multiple differently colored objects is not a common task? It's very common for me figuring out the correct color matching for objects.
Thank you for you help btw

Re: How to apply relative color changes to multiple objects?
ragstian wrote:Hi
All the extensions use a program external to Inkscape. Most extensions that follow Inkscape are written in Python.
When you "start" an extension the Python interpreter has to be started,
the interpreter loads the extension code, the code is then excecuted.
Most of the "delay" you see is most likely from the start & load.
My extension (with slider) works just as slow as the original brighten extension.
No point in "releasing" the extension if speed is your ultimate goal.
Might be an idéa to submit a "feature request" to the development team?
RGDS
Ragnar
Hi Ragnar, did you by chance ever finished that extension? Or add a way to also increase/decrease saturation and hue? If so I think it would be hugely useful to control how much to increase/decrease with those percentages just as you showed in the screenshot.
Re: How to apply relative color changes to multiple objects?
Hi.
The extension is working but I would have to "tidy up" the code before I release it.
( I am not a programmer! )
If you would find this extension useful I will do so.
Stay tuned.
RGDS
Ragnar
The extension is working but I would have to "tidy up" the code before I release it.
( I am not a programmer! )
If you would find this extension useful I will do so.
Stay tuned.
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: How to apply relative color changes to multiple objects?
ragstian wrote:Hi.
The extension is working but I would have to "tidy up" the code before I release it.
( I am not a programmer! )
If you would find this extension useful I will do so.
Stay tuned.
RGDS
Ragnar
Awesome that you would take the time to do that, thank you very much! I would find it very useful. I often find myself using the more/less hue/saturation darker/brighter functions. But the step is to large. So for example a brown color becomes red when using less hue. With lesser increments I can tweak the colors much easier.
Re: How to apply relative color changes to multiple objects?
Hi.
Have you tried the 0.91's Extension - Color - HSL adjust?
It works on all selected objects and seems to do the same as my extension.
RGDS
Ragnar
Have you tried the 0.91's Extension - Color - HSL adjust?
It works on all selected objects and seems to do the same as my extension.
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: How to apply relative color changes to multiple objects?
ragstian wrote:Hi.
Have you tried the 0.91's Extension - Color - HSL adjust?
It works on all selected objects and seems to do the same as my extension.
RGDS
Ragnar
No I haven't. I wasnt even aware there was an Inkscape version 0.91, but now I know lol. I will try it out to see, thank you very much!

Re: How to apply relative color changes to multiple objects?
Hi.
You're not visiting the forum frequently enough!
RGDS
Ragnar
toxigames wrote: I wasn't even aware there was an Inkscape version 0.91
You're not visiting the forum frequently enough!

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: How to apply relative color changes to multiple objects?
ragstian wrote:Hi.toxigames wrote: I wasn't even aware there was an Inkscape version 0.91
You're not visiting the forum frequently enough!![]()
RGDS
Ragnar
You're absolutely right

