I have put ~40 rectangles in one row, each one with different fill color. Then I saved it as .gpl file in ~/.inkscape/palettes, here you can see what I've got after restarting Inkscape:
The top row shows color palete in svg file before export, in the bottom you can see already exported pallete. The question is: why Inkscape has changed order of colors after exporting pallete to .gpl and how to prevent it?
[solved] Change order of colors in pallete created from SVG
Re: Change order of colors in pallete created from SVG file
my guess would be its doing it on z-order not position, if you open the xml editor and select the top one then move down i expect you'll find the selection jumps about in the order your seeing on the imported. Cant think of the easiest way to fix it right now.
Re: Change order of colors in pallete created from SVG file
If z-order is the problem, Rob Antonishen's restack extension should be able to fix it. It's included in recent dev builds (Effects -> Arrange -> Restack).
Re: Change order of colors in pallete created from SVG file
I see now - it goes from the top to the bottom of the xml tree, not from the top to the bottom of the screen. So the order of exported palette purely depends on the creation time of given rectangle, not its align on the screen. I would have to cut each rectangle and paste it again to reorder xml tree. Is there any faster way to do this?
Re: Change order of colors in pallete created from SVG file
sas wrote:If z-order is the problem, Rob Antonishen's restack extension should be able to fix it. It's included in recent dev builds (Effects -> Arrange -> Restack).
Thanks sas, that solves the problem.