Re: [cc65] TGI palettes (was: TGI colors revisited)

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2011-05-13 15:53:53
Hi!

On Wed, May 11, 2011 at 10:44:45AM -0400, Daniel Serpell wrote:
> There is another option, the one used by earlier X windows functions. In those,
> you can "allocate" a new color, and the driver returns the best approximation
> of that color.

I have to admit that I didn't like this idea in the first place. But after
thinking about it for a while, it looks like it has some advantages over the
palette approach.

We can also pass larger values than a byte to tgi_alloccolor, so the argument
could actually contain RGB values on platforms that support it. So an
application for the Lynx could either use the TGI_COLOR_XXX macros or pass
encoded R/G/B values to the tgi_alloccolor function. It won't be portable any
more, but can fully support all colors.

One drawback is that existing programs need additional code and must be
converted, since the TGI_COLOR_XXX macros may no longer be passed to
tgi_setcolor.

I would refrain from adding things like tgi_darken/lightencolor, because color
effects won't look good when made portable anyway.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri May 13 15:54:05 2011

This archive was generated by hypermail 2.1.8 : 2011-05-13 15:54:08 CEST