Stephan Henningsen wrote:
> Is it possible to generate a palette of an image, and have
> the colours sorted?  For example have all the colours in a
> greyscaled image sorted from 0x0000 to 0xFFFF? (Is
> greyscale only 255 colours?)
> --
> Stephan Henningsen  /
>                    /

Below is a user mail from last month (I think) in which Jeff Trefftzs
worte a perl script to sort palettes and another to convert palettes to


Jeff Trefftzs wrote:
> I have wondered about this myself in connection with palettes,
> which often have a nicely selected set of colors already
> available. I have built a pair of little perl procs to (1) sort
> a palette by value, hue, saturation, or hsv_value,
> and (2) create a gradient from a palette. In the hope that
> these may answer your need, I have attached them.
> Caveats: They are NOT documented very well. Consider them
> beta, at best. I have used them successfully myself, but YMMV.
> Particularly on, read the code. You can set the number of steps in the 
>resulting gradient.
> --
> --Jeff
> Jeff Trefftzs
> Home Page
> Gimp Gallery
> A photo gallery
> Another photo gallery

Here are those scripts:

1. (3 KB)

2. (1 KB)
Gimp-user mailing list

Reply via email to