Named colors

Share your Inkscape tricks and tutorials here.
rosros
Posts: 68
Joined: Fri Aug 24, 2007 12:54 am

Named colors

Postby rosros » Tue Sep 25, 2007 2:12 am

Named Colors is a useful tool of Xara Picture Editor. The tool may be divided in two parts: Part 1: colors are assigned a name, for instance CMYK 6-3-0-0 is called "aliceblue"; this color is then used in the drawing. If I decide later that all the objects in "aliceblue" color should be CMYK 0-59-29-0 (hotpink), I just change the actual color associated to "aliceblue". Part 2: Shades of colors are connected to the base color and changed automatically when the base color is changed. A way to get a similar effect with the current Inkscape 0.45.1, for the Part 1 only, could be:
1) Assign a gradient to you object: E.g. Gradient3329; optionally rename it for instance "MyColor1" (then assign it again to the object)
2) Open the XML Editor:
2.1) Delete the second step of the Gradient
Now "MyColor" can be assigned to several objects, and by editing it in the gradient editor I can change the color of all those objects at the same time.
What do you think?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Named colors

Postby microUgly » Tue Sep 25, 2007 8:14 am

Pretty clever. A few times I've been temtped to use gradients for flat colours simply so I could easily change the colour throughout a drawing. If you delete the second step, can you still edit the gradient in the gradient editor?

JonCruz
Posts: 6
Joined: Tue Sep 25, 2007 1:16 pm
Location: Fullerton, CA
Contact:

Re: Named colors

Postby JonCruz » Tue Sep 25, 2007 1:25 pm

rosros wrote:A way to get a similar effect with the current Inkscape 0.45.1, for the Part 1 only, could be:
1) Assign a gradient to you object: E.g. Gradient3329; optionally rename it for instance "MyColor1" (then assign it again to the object)
2) Open the XML Editor:
2.1) Delete the second step of the Gradient
Now "MyColor" can be assigned to several objects, and by editing it in the gradient editor I can change the color of all those objects at the same time.
What do you think?

This actually appears to be the "proper" way to get a solid color specified in SVG 1.1.

rosros wrote:Part 2: Shades of colors are connected to the base color and changed automatically when the base color is changed.


Guess what? That code is already in Inkscape... it's just not generically live without special user intervention.


In general we're hitting a problem with isolated communities. I generally don't follow other than the official Inkscape lists (devel and user). But lots of this is in Inkscape or about to be. Including the changes for full icc-profile() color picking and support I just checked in. Grab the latest SVN and give it a spin.
Jon A. Cruz
Chief Agitator
Inkscape
http://www.inkscape.org

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Named colors

Postby microUgly » Tue Sep 25, 2007 3:35 pm

JonCruz wrote:Guess what? That code is already in Inkscape... it's just not generically live without special user intervention.

How can we access or find out more about it?

JonCruz wrote:In general we're hitting a problem with isolated communities. I generally don't follow other than the official Inkscape lists (devel and user). But lots of this is in Inkscape or about to be. Including the changes for full icc-profile() color picking and support I just checked in. Grab the latest SVN and give it a spin.

I disagree that there is a problem. A number of us keep ourselves informed about what's happening with Inkscape using more than just this forum - there's no such thing as "isolated" when it comes to the internet.

User avatar
heathenx
Posts: 388
Joined: Thu Jun 07, 2007 11:51 pm
Location: USA
Contact:

Re: Named colors

Postby heathenx » Wed Sep 26, 2007 11:10 am

I disagree that there is a problem. A number of us keep ourselves informed about what's happening with Inkscape using more than just this forum - there's no such thing as "isolated" when it comes to the internet.


i agree with microUgly. we're not isolated. many of us here subscribe to the inkscape mailing lists.

rosros
Posts: 68
Joined: Fri Aug 24, 2007 12:54 am

Re: Named colors

Postby rosros » Wed Sep 26, 2007 6:18 pm

The "single step gradient", i.e. full color, can be edited in the gradient editor, for instance by moving the Hue slider (of HSL).
The color of the objects is updated when the mouse button is released. In Xara updating occurs while the color is changed in the editor, that is "in real time", this gives better control on the result on the canvas. Maybe JonCruz can let the developers know, and the same effect achieved by moving a few lines of code ...

User avatar
prokoudine
Posts: 186
Joined: Sat Jun 09, 2007 4:32 am
Contact:

Re: Named colors

Postby prokoudine » Wed Sep 26, 2007 8:09 pm

rosros wrote:Maybe JonCruz can let the developers know

Jon Cruz is core team developer :D
http://libregraphicsworld.org — news and tutorials on free design software

rosros
Posts: 68
Joined: Fri Aug 24, 2007 12:54 am

Re: Named colors

Postby rosros » Wed Sep 26, 2007 10:33 pm

Good to know!
Dear Jon Cruz, is it possible to adapt the mouse-event code from the "Fill & Stroke" dialog to the "Gradient Editor" dialog so that color changes on current stop (and on the page) are shown in real time?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Named colors

Postby microUgly » Thu Sep 27, 2007 7:33 am

rosros wrote:Good to know!
Dear Jon Cruz, is it possible to adapt the mouse-event code from the "Fill & Stroke" dialog to the "Gradient Editor" dialog so that color changes on current stop (and on the page) are shown in real time?

Log a feature request.

If you really want to get the attention of the developers you'll need to post on the developers mailing list. This forum isn't a good place to request features as they will likely go unnoticed (Jon has only posted here once).

rosros
Posts: 68
Joined: Fri Aug 24, 2007 12:54 am

Re: Named colors

Postby rosros » Thu Sep 27, 2007 8:01 pm

I have posted a feature request on sourceforge for the real-time gradient editing and
also for cubic spline interpolation of the stoppoints of gradients which can be achieved easily
in python with scipy (see example#3 on http://rosros-3.blogspot.com/).

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Named colors

Postby microUgly » Thu Sep 27, 2007 8:35 pm

Yes, an option to interpolate the transition of gradient is the best idea. It's something I've always noticed that you have to manually add points to create a smoother transition. If an option to interpolate the curves was available I doubt I would ever use the linear curve.

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: Named colors

Postby Simarilius » Fri Sep 28, 2007 3:39 am

Does SVG support anything other than linear?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Named colors

Postby microUgly » Fri Sep 28, 2007 8:16 am

Simarilius wrote:Does SVG support anything other than linear?

I checked last night and it seems it doesn't. But I assumed that may not prevent the developers from implementing something whereby additional stops to smooth the paths are automatically added - it still won't be a curve, but will be a closer fit. Although I can appreciate that it may not be easy to implement since the user would still only want to work with the stops they defined and not the additional stops Inkscape creates.

rosros
Posts: 68
Joined: Fri Aug 24, 2007 12:54 am

Re: Named colors: real time editing

Postby rosros » Mon Oct 01, 2007 5:20 pm

My request for a real-time gradient editing on sourceforge got the following reply:
>>Comment By: bulia byak (buliabyak)
>Date: 2007-09-28 07:40
>Message:
>Logged In: YES
>user_id=741217
>Originator: NO
>
>in 0.46 all gradient editing is on canvas, gr editor is gone
In the current development versions (inkscape200709061136.package, installed in Linux [Ubuntu Feisty])
the editor is still there, there is also a color replacement dialog which should make do in most cases.
Colors are replaced by inserting their hexadecimal codes (without the alpha channel) only, which - in my
opinion - is a bit cumbersome.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Named colors

Postby microUgly » Mon Oct 01, 2007 8:41 pm

Ah, he is correct. Editing gradients on the canvas benefit from a real-time colour changes.


Return to “Tricks & Tutorials”