On Thu, 30 Oct 2003, Branden Robinson wrote:
> On Wed, Oct 29, 2003 at 03:19:17PM -0500, Thomas Dickey wrote:
> > > > at the moment I'm only interested in bug-fixes (not changing configuration
> > > > around). As it's setup now, I think that a user can easily turn on the
> > > > locale feature and experiment with it. (I just got some negative feedback
> > > > regarding the blue/Dodger blue resource change - have to keep things from
> > > > getting out of hand ;-)
> > >
> > > Yeah, people yelled at me about that too, but I stood my ground.
> > it would be nice if I could (somehow) make the color map adapt dynamically
> > to make everything get good contrast. Even the example that I got in
> > feedback was still more readable than the darker blue on black. (Bear in
> > mind that when I setup color resources in 1996/1997, the choice was for
> > names that were present in X11R5 and X11R6 rgb.txt, since I didn't trust
> > the numeric specifiers - and I was usually making white backgrounds).
> I don't know much about colorspace stuff, but I wonder if the text color
> values could be converted to HVC (Hue/Value/Chroma) internally, compared
> to the HVC value of the background, a useful adjustment made in that
> space, and the text colors remapped.
> I am wondering if it is this simple:
It might be. When I added the code to (attempt to) keep the cursor color
distinct from the background, I didn't notice anything that I could have
used. But revisiting it, might see something to exploit. Anyway, right
now my changes to xterm til XFree86 4.4 is out will be only essential
> The background color is likely to have a V of close to 0 or close to 1.
> (Most people have either very light or very dark backgrounds.)
> For each text color,
> If background V is close to 0:
> If text color V is < 0.5, set it to 1.0 - V.
> If text color V is > 0.5, leave it alone.
> If background V is close to 1:
> If text color V is < 0.5, leave it alone.
> If text color V is > 0.5, set it to 1.0 - V.
> A computer graphics professional, or anyone who actually understands
> colorspaces, should be able to see any awful flaws in this immediately.
Thomas E. Dickey