Mail Archives: djgpp/1999/12/01/17:48:33
frEk <20014670 AT snetch DOT cpg DOT com DOT au> wrote:
> I wrote:
> > "Shawn Hargreaves" wrote:
> > > James Migel writes:
> > > > Is it possible that I have to load a color palette
> > > > before it knows any colors?
> > >
> > > It's possible (otherwise you are just relying on your BIOS to have
> > > set the colors, and I wouldn't trust that to always give you the same
> > > colors on every different machine).
> >
> > Doesn't the VGA spec give a default 256-color palette?
> > (EGA palette, gray ramp, NES-ish palette...)
>
> Yep, in that order... The "NES-ish" palette is a set of colours
> reramped at slightly darker colours... I think they attempted
> to get a combination of colours that could support all images
> but I think it's horrible anyway ;)
That's how the NES makes colors. Bits 5-4 represent
lightness, and 3-0 represent hue (0, 13 = grays; 1-12 colors).
Darn good system for the time. The VGA designers tried to
extend this paradigm to 256 colors, but...
In FreePuzzleArena, I used this palette:
0: border color (palette animated); transparency
(I use 16 for black.)
1-15: EGA palette, with color 6 changed from (42, 21, 0)
to (42, 42, 0) to make dithering easier
16-31: 16-level gray ramp
32-39: Eight free spaces for palette animation
40-255: 6x6x6 color cube, a.k.a. web-safe palette
Get this palette where you get DOSArena.
http://yerricde.tripod.com/binaries/
Damian Yerrick
- Raw text -