Once upon a time I made a Mandelbrot generator for the Amiga. (So long ago that I can't find it on AmiNet any more). I included a wonderful palette generation option, called Rainbow Mode, which provided very nice gradual colour ranges.
As far as I can remember and recreate from some code that I'm looking at, it worked as follows.
There are 3 colour sliders, for Red, Green and Blue (CMY could work too, I suppose). They range over the palette entries. For the red slider, the position indicates which palette entry has a maximum red component. The two palette entries next to it have a slightly lower red component, the 2 entries 1 further away even less, etc, until at some (selectable) distance, the red component is 0. (Similar for the other 2 colours).
I originally used a linear interpolation between maximum and minimum component value, but maybe a sinus or something else would work nicely too.
UAE (the Amiga Emulator) seems to crash on me right now, or I'd try to include a screen shot.
The code which calculates the palette (12 bits per colour, 4 bits per component):
From rhialto....@gmail.com on February 16, 2011 16:31:37
Suggestion, not a problem:
Once upon a time I made a Mandelbrot generator for the Amiga. (So long ago that I can't find it on AmiNet any more). I included a wonderful palette generation option, called Rainbow Mode, which provided very nice gradual colour ranges. As far as I can remember and recreate from some code that I'm looking at, it worked as follows.
There are 3 colour sliders, for Red, Green and Blue (CMY could work too, I suppose). They range over the palette entries. For the red slider, the position indicates which palette entry has a maximum red component. The two palette entries next to it have a slightly lower red component, the 2 entries 1 further away even less, etc, until at some (selectable) distance, the red component is 0. (Similar for the other 2 colours).
I originally used a linear interpolation between maximum and minimum component value, but maybe a sinus or something else would work nicely too.
UAE (the Amiga Emulator) seems to crash on me right now, or I'd try to include a screen shot.
The code which calculates the palette (12 bits per colour, 4 bits per component):
STATIC ModifyColors() { ULONG newred, newgreen, newblue;
}
Original issue: http://code.google.com/p/gnuxaos/issues/detail?id=56