I was able to create a .gpl file colour palette which is working fine with Inkscape. Sadly, the colours auto arranged themselves in some funny order. Probably from ffffff to 000000. All I had to do was create rectangles of desired hex colours and then save as .gpl using Inkscape. Now that I have placed the .gpl file in the palette folder and restarted Inkscape, all the colours are available when I choose the palette by name, sadly, in a messed up order. It will be great if someone can suggest a fix. Thanks.
Please see the image below for the order in which I have stacked the colours and how it ended up appearing on the palette
It doesn't look to me like they are in order from 000000 to ffffff. But that is definitely a strange order!
Well, I can't answer your question directly. But until someone comes along who can, I thought I would suggest you could look at some other GPL palette file. It might give a clue as to how to arrange them to your liking.
Oh, and I think I might have a tutorial or 2, which might also have a clue in them. Let's see.... Ok, here's one:
You would need to manually edit the palette file to change the order. But there is probably some way to modify the extension you found to keep the order.
Thanks @TylerDurden Looks like manually editing the file when saving as .gpl is the only way out. Hopefully, something will change in the upcoming version for which beta is now available. Is there any wishlist place where we can request it ?
@meetdilip are you using an extension to save the .gpl file? It seems to be ordered alphabetically.
I tested Save as and then choosing the GIMP palette and the results are the same. No matter what the order of objects within the SVG file (not the visual order!) the colors get reordered alphabetically.
To solve it youhave to Edit the palette file after you export it from Inkscape. Open it in a text editor, each color is on a separate line, and reorder them yourself in the "correct" desired order.
Then place that edited file in Inkscape config palettes folder and now the colors will appear in the order you sorted manually in a text editor.
I'm using Gedit text editor and there is a plugin that shows the color in a popup when you highlight the hex code, maybe something like that can help to speed up the sorting.
Or just keep your Inkscape document open side by side with the text editor window and you'll be able to quickly identify which color should go in what order.
Thank you @prkos I was originally trying to add some colour boxes in the document and save them as .gpl file. While it works, as you mentioned, I need to edit it in gedit. That is fine. I managed to find the extension which can remember the order in which I selected colours before exporting as a palette.
I think it would be still nice if simple " save as gpl " allows some method to set the order of colours. This extension is doing it great for now. Thanks for your inputs. :)
I was able to create a .gpl file colour palette which is working fine with Inkscape. Sadly, the colours auto arranged themselves in some funny order. Probably from ffffff to 000000. All I had to do was create rectangles of desired hex colours and then save as .gpl using Inkscape. Now that I have placed the .gpl file in the palette folder and restarted Inkscape, all the colours are available when I choose the palette by name, sadly, in a messed up order. It will be great if someone can suggest a fix. Thanks.
Please see the image below for the order in which I have stacked the colours and how it ended up appearing on the palette
It doesn't look to me like they are in order from 000000 to ffffff. But that is definitely a strange order!
Well, I can't answer your question directly. But until someone comes along who can, I thought I would suggest you could look at some other GPL palette file. It might give a clue as to how to arrange them to your liking.
Oh, and I think I might have a tutorial or 2, which might also have a clue in them. Let's see.... Ok, here's one:
https://dl.dropboxusercontent.com/s/ureva7n4uyue6e6/Gimp_Palette_Howto_V0_2.pdf
And the other I can remember:
https://manjitkarve.com/posts/inkscape-custom-palette/
Have you tried checking the actual order of the squares in the SVG code? I think the palette should follow that order.
You can check it from within Inkscape too, the XML editor or the Object dialogue.
@brynn I have just attached the gpl file which got generated when I saved the stack as name.gpl file.
PS : I will check the files you gave.
@Mihaela Jurkovic ,I am not sure what you mean by " actual order of squares in SVG code ". I use hex codes in a particular order to colour the boxes.
Thanks for the reply both of you.
Update :
Looks like we have manually select them one by one in the desired order. Also create them in the desired order. Both should work. I check and tell.
2. No matter in which order we create, it takes 1,2,3 a,b,c,d order based on the hex codes used.
You would need to manually edit the palette file to change the order. But there is probably some way to modify the extension you found to keep the order.
Thanks @TylerDurden Looks like manually editing the file when saving as .gpl is the only way out. Hopefully, something will change in the upcoming version for which beta is now available. Is there any wishlist place where we can request it ?
@meetdilip are you using an extension to save the .gpl file? It seems to be ordered alphabetically.
I tested Save as and then choosing the GIMP palette and the results are the same. No matter what the order of objects within the SVG file (not the visual order!) the colors get reordered alphabetically.
To solve it youhave to Edit the palette file after you export it from Inkscape. Open it in a text editor, each color is on a separate line, and reorder them yourself in the "correct" desired order.
Then place that edited file in Inkscape config palettes folder and now the colors will appear in the order you sorted manually in a text editor.
I'm using Gedit text editor and there is a plugin that shows the color in a popup when you highlight the hex code, maybe something like that can help to speed up the sorting.
Or just keep your Inkscape document open side by side with the text editor window and you'll be able to quickly identify which color should go in what order.
GIIMP has a palette editor maybe you can open your exported palette file in GIMP and reorder it there visually, but I haven't tried it: https://docs.gimp.org/2.10/en/gimp-palette-dialog.html#gimp-palette-editor-dialog
Thank you @prkos I was originally trying to add some colour boxes in the document and save them as .gpl file. While it works, as you mentioned, I need to edit it in gedit. That is fine. I managed to find the extension which can remember the order in which I selected colours before exporting as a palette.
I think it would be still nice if simple " save as gpl " allows some method to set the order of colours. This extension is doing it great for now. Thanks for your inputs. :)