It is currently Wed Sep 30, 2026 10:20 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Colour Palette question - can I export to a new image?
PostPosted: Tue Mar 17, 2015 11:21 am  (#1) 
Offline
New Member

Joined: Mar 17, 2015
Posts: 3
GIMP Version: 2.8.10
Operating System: Linux
GIMP Experience: Intermediate Level



Hi everyone, I'm wondering if it's possible to automatically create an image showing the colours from a palette.

To explain further ... let's say I open a jpeg file in Gimp, and I change it to Indexed mode with (e.g.) 255 colours. I know I can open the Palette dock and see all the colours listed there. However, I'm wondering if it's possible to generate a new image displaying those colours. Think of one of those paint swatches with various different shades printed on them, and that's pretty much what I'm looking for. I'd like to save the palette to an external file (whether a gif or png or whatever) so that I have it stored outwith GIMP and could email to someone else if required. I know I could probably send on the palette file, but a separate image would be much simpler.

I've tried to google this, but I'm not sure if I'm using the incorrect terms or if this isn't possible. Would appreciate any advice. Thanks!


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Colour Palette question - can I export to a new image?
PostPosted: Tue Mar 17, 2015 11:24 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
Could you right click the palette and save as, then name it and save to your desktop?

_________________
Image


Top
 Post subject: Re: Colour Palette question - can I export to a new image?
PostPosted: Tue Mar 17, 2015 12:08 pm  (#3) 
Offline
New Member

Joined: Mar 17, 2015
Posts: 3
Hi, thanks for replying. I can right click and chose the 'Export as' option to export the palette to a text file or CSS file among other options, but I can't directly generate an image from here (I don't believe). I might be able to mess about the colour codes to create an HTML file perhaps, but I'd hoped for a more automated way.


Top
 Post subject: Re: Colour Palette question - can I export to a new image?
PostPosted: Tue Mar 17, 2015 12:26 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Dec 27, 2014
Posts: 508
Hello ChickPea, and welcome to GimpChat.

Quick and dirty solution: just take a screenshot of the palette display in the Palette Editor dialog!
Tip: if you detach the Palette Editor dockable dialog from its dock you can rescale the dialog window, adjust the columns number and use the zoom buttons or "zoom all" to get a larger/better representation before taking a screenshot.

If this is something you're going to be doing a lot, perhaps a script would be more appropriate.


Top
 Post subject: Re: Colour Palette question - can I export to a new image?
PostPosted: Tue Mar 17, 2015 12:45 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
another quick solution could be:
- export the palette as gradient
- new image
- fill with created gradient
- print

_________________
"Where am I ?"


Top
 Post subject: Re: Colour Palette question - can I export to a new image?
PostPosted: Tue Mar 17, 2015 1:02 pm  (#6) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14219
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
There is a script called, Translate into Palette that might be helpful to you.
Here's a link to the thread... viewtopic.php?f=9&t=9561#p124412

I used this script to create this palette using my Leprechaun image as the source.
Image

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Colour Palette question - can I export to a new image?
PostPosted: Tue Mar 17, 2015 2:02 pm  (#7) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
The following script will generate a palette preview image of the type found here. If the image is in Indexed mode, you can check the box to create a preview of its colormap.

http://chiselapp.com/user/saulgoode/rep ... 5e4514422d

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Colour Palette question - can I export to a new image?
PostPosted: Tue Mar 17, 2015 6:05 pm  (#8) 
Offline
New Member

Joined: Mar 17, 2015
Posts: 3
Firstly, a huge thank you to everyone who replied. I appreciate you taking the time to try to help.

Jontait2, your answer was so incredibly simple yet absolutely perfect! I opened the Colourmap dialogue (rather than Colour Palette), dragged it out a bit, pressed Alt+PrtSc, and my Ubuntu OS automatically saves a screenshot into my pictures folder. I've attached a sample image of what it created, and it's exactly what I'm looking for. This is so simple I can't believe I didn't think of it myself! :D

I appreciate the other comments about using Scripts, but to be honest, the solution above is all I need. I can share this image and use the eye dropper tool to get exact colour values.

Thanks again everyone! You've been really helpful.


Attachments:
colourmap.png
colourmap.png [ 17.71 KiB | Viewed 5337 times ]
Top
 Post subject: Re: Colour Palette question - can I export to a new image?
PostPosted: Tue Mar 17, 2015 6:22 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
ChickPea wrote:
Firstly, a huge thank you to everyone who replied. I appreciate you taking the time to try to help.

Jontait2, your answer was so incredibly simple yet absolutely perfect! I opened the Colourmap dialogue (rather than Colour Palette), dragged it out a bit, pressed Alt+PrtSc, and my Ubuntu OS automatically saves a screenshot into my pictures folder. I've attached a sample image of what it created, and it's exactly what I'm looking for. This is so simple I can't believe I didn't think of it myself! :D

I appreciate the other comments about using Scripts, but to be honest, the solution above is all I need. I can share this image and use the eye dropper tool to get exact colour values.

Thanks again everyone! You've been really helpful.


Thanks saul I didn't know about that script.

_________________
Image


Top
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group