It is currently Mon Apr 15, 2024 7:48 am


All times are UTC - 5 hours [ DST ]


Switch to mobile style

Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: SOLVED Some way to create a high-entropy color palette?
PostPosted: Thu Apr 20, 2017 2:16 pm  (#21) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
This is the text (as seen in notepad++) of MB 657.
I had to zip the .txt, just unzip it.
Attachment:
MyGrad_MB_657.zip [3.44 KiB]
Downloaded 71 times

_________________
"Where am I ?"


Top
 Post subject: Re: SOLVED Some way to create a high-entropy color palette?
PostPosted: Thu Apr 20, 2017 2:27 pm  (#22) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
So at a minimum my unwritten Perl script (which works perfectly in my imagination btw) would at a minimum parse all the GGR files, no matter on what continent or on ships at sea, hunting for the one with the largest value in line 3. Then, it would go on to ascertain that all the colors were unique. Then it would output gold sovereigns. But not too many.

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: SOLVED Some way to create a high-entropy color palette?
PostPosted: Thu Apr 20, 2017 3:56 pm  (#23) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
I created this post with the hope that a GIMP script might be written: I apologize that this is not about a script, per se.

However, having acquainted myself with the clear exposition of GGR by user jsbueno on stackoverflow, I've thrown together a Perl script to create a gradient of randomized colors which may become grist for someone else's script mill, to wit:
#!/usr/bin/perl

open FILE, ">New256color.ggr" or die $!;
print FILE "GIMP Gradient\n";
print FILE "Name: New256color\n";
print FILE "256\n";
for($seg=0;$seg<1;) {
$segm=$seg+1./512.;
$segr=$seg+1./256.;
print FILE "$seg $segm $segr ";
$red=rand();
$green=rand();
$blue=rand();
print FILE "$red $green $blue 1 ";
print FILE "$blue $red $green 1 "; # 2nd, blend of L and R colors across segment
#print FILE $red $green $blue 1 "; # Orig. pure color across segment
print FILE "0 0\n";
$seg=$segr;
} # for seg

close FILE or die $!;


Actually, there are more than 256 colors, I think. Originally, I used the same values of RGB for both left and right endpoints of each segment, but at the last moment, I got the bright idea to alter the right-hand endpoint in a trivial way. The result appears to be that GIMP creates a new mini- or micro-gradient on each of the 256 segments. However Colors->Info->Histogram reports pixel counts only for values 0-255, so although ANY collection of 256 colors is possible, only 256 are stored in a palette. (No doubt long-time users of GIMP are much more familiar with its constraints than I am.)

Here's a comparison between (a closeup of) the 2nd (blended segments, above) and original gradients:
Attachment:
twotypesofrandompalettes.png
twotypesofrandompalettes.png [ 2.02 KiB | Viewed 781 times ]

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts How To Create A Color Palette In Gimp (Video Tutorial)

8

No new posts Attachment(s) Benjamin Moore Gray Color Palette (Orange Palette Added)

26

No new posts Attachment(s) The High Altitude Mobiles Of Maldonia

4

No new posts High Intensity Texture Mapping

0

No new posts palette not saving

0



* Login  



Powered by phpBB3 © phpBB Group