Gimp-Forum.net
Sort palette colours - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Sort palette colours (/Thread-Sort-palette-colours)

Pages: 1 2


RE: Sort palette colours - rich2005 - 12-04-2019

Before diving into 'why not working' can you confirm that in the Filters menu you have the Python-Fu entry.

[attachment=3540]


RE: Sort palette colours - meetdilip - 12-05-2019

Yes, it is there. And it has one entry " console ".

[attachment=3543]


RE: Sort palette colours - rich2005 - 12-05-2019

Ok. You use ubuntu 18.04 and Gimp 2.10.14 from https://launchpad.net/~otto-kesselgulasch/+archive/ubuntu/gimp and I use the same.
Some parts do not work for you but work for me. Conclusion, something broken in your installation.

I am assuming you installed Gimp from a terminal as shown in https://www.gimp-forum.net/Thread-Gimp-2-10-10-and-Ubuntu-18-04-LTS

You can check the python console, it should look like the inset in the attached screenshot. Version numbers should coincide. Other than that do not bother with the terminal. There is a search function in Gimp 2.10, press the / (forward slash) to bring up the search box, enter a search term to see what is available. You can use this to reach a function if you click on the entry. screenshot: https://i.imgur.com/UDYBS2M.jpg

Seems your interests lean towards animation, sometime you will need a working python installation. Ofnuts for example has useful plugins for merging / adding to animations.

You could try re-installing Gimp according to the above, might / might not work. (If I was doing it, I would purge the existing first)

An alternative Gimp 2.10.14 There is a portable Gimp, an appimage here: https://github.com/aferrero2707/gimp-appimage/releases/
You want the 2.10.14-with-plugins https://github.com/aferrero2707/gimp-appimage/releases/download/continuous/GIMP_AppImage-release-2.10.14-withplugins-x86_64.AppImage (140 MB) Put anywhere you like, make it executable, run it. Slightly different from the regular Gimp 2.10, makes a Gimp profile ~/.config/2.10-Appimage. Otherwise works the same for the user.

Sorry I can not help more, best of luck


RE: Sort palette colours - meetdilip - 12-05-2019

Yes, the same PPA..

Console output was the same as the screenshot you shared

When I tried " / " and searched for " sort " and double-clicked the result. The sorting is working to some extent. But the unexpected part is, I now have the right-click menu like I saw in your screenshots. I don't know how, but the sort options and other are back.

Thanks for the help.


RE: Sort palette colours - AngelH - 05-31-2023

Using Windows 10, Gimp 2.10.34

I am just learning how to create and work with Palettes in Gimp. 

I was color picking to make palettes but tonight I found a super easy way to make a full palette and an easy way to sort the colors..

Open Image
Image > Mode > Indexed and follow instructions in the link to create a Colormap.

But using https://docs.gimp.org/en/plug-in-colormap-remap.html
Colors > Map > Rearrange Colormap


On the popup menu Right Click and it will give you a preview of the various sorts available. You can reset it if you don't like any of the them.

But as I'm writing this I realize that won't work for a palette, only for colormaps. Mmm, there must be an easier way than manually moving each square of a palette.

Once you've made the Colormap you can Duplicate the Colormap and Rename it and it gets saved as a palette. Since we can sort Colormaps perhaps it's better to have Colormaps rather than Palettes. But sometimes we only want certain colors and make a palette, but then the sorting is tedious.

Are you able to export the Gimp Palette to Inkscape and sort it over there and then bring it back to Gimp?

I would love to hear if you are able to make it work.

Have you used the Palette tool > Import Palette> from Image and get more than one square?

Angel


RE: Sort palette colours - rich2005 - 05-31-2023

OK, you are using Windows so there is no problem with linux and python plugins (see earlier posts)

Quote:Are you able to export the Gimp Palette to Inkscape and sort it over there and then bring it back to Gimp?

Inkscape uses the Gimp .gpl palette format and your name.gpl file goes in the Inkscape User profile, guessing that will be near the Gimp User Profile. That is easy enough but I have never sorted a palette in Inkscape. I found a bit about it here: https://graphicdesign.stackexchange.com/questions/130005/set-order-for-colours-in-gpl-colour-palette-in-inkscape

That does not look much different to the Gimp sort palette. Starting with an image, Tried to get all on one screenshot, so it is a bit cramped. 

[attachment=9872]

(1) is the Import dialogue. I have never been able to get the palette sorted as per the image.
(2) is the palette and (3) you might get a better sort using Value. Still not the same order as the source image.

What is possible with .gpl files is they are text and depending how keen you are, they can be edited. Get a Windows text editor such as notepad++

[attachment=9873]

(4) is straight as Gimp generated and (5) is edited changing the order and naming the entries.


RE: Sort palette colours - AngelH - 05-31-2023

(05-31-2023, 05:28 PM)rich2005 Wrote: OK, you are using Windows so there is no problem with linux and python plugins (see earlier posts)

Quote:Are you able to export the Gimp Palette to Inkscape and sort it over there and then bring it back to Gimp?

Inkscape uses the Gimp .gpl palette format and your name.gpl file goes in the Inkscape User profile, guessing that will be near the Gimp User Profile. That is easy enough but I have never sorted a palette in Inkscape. I found a bit about it here: https://graphicdesign.stackexchange.com/questions/130005/set-order-for-colours-in-gpl-colour-palette-in-inkscape

That does not look much different to the Gimp sort palette. Starting with an image, Tried to get all on one screenshot, so it is a bit cramped. 

(1) is the Import dialogue. I have never been able to get the palette sorted as per the image.
(2) is the palette and (3) you might get a better sort using Value. Still not the same order as the source image.

What is possible with .gpl files is they are text and depending how keen you are, they can be edited. Get a Windows text editor such as notepad++

(4) is straight as Gimp generated and (5) is edited changing the order and naming the entries.

I thought meetdilip might be able to do that since he was using both Inkscape and Gimp. Inkscape still intimidates me.

Thank you for sharing how to name the colors in the palettes. Nice little trick. Wink Wink Wink

However, I'd in your screenshots above you actually end up with colors in your palette from the image. And everyone else seems to too. But I can't get that.

The number of colors and columns is different than yours, but it does the same thing if I use your numbers.

And here is the finished palette. And even if I have other layers visible it doesn't work for that either. Usually I get at least one square of color in the palette.

Do you know why it isn't working for me?[attachment=9876][attachment=9877]


RE: Sort palette colours - rich2005 - 05-31-2023

Just play with the sliders Wink For a photograph, with many colours the interval slider makes the most difference. (I think that is the sampling interval)

example: https://i.imgur.com/fyfCum9.mp4


RE: Sort palette colours - AngelH - 05-31-2023

(05-31-2023, 07:10 PM)rich2005 Wrote: Just play with the sliders Wink  For a photograph, with many colours the interval slider makes the most difference. (I think that is the sampling interval)

example: https://i.imgur.com/fyfCum9.mp4

Hi Rich,
That worked!
Thank you for the video to explain it. Smile