A while back, I devised a method of providing named colors which could be adapted to any given background color, with a reasonable guarantee of readability. Anyone interested in the details can check out my previous two entries about it:
- Overengineering beyond all reasonable limits: automatic color palette optimization
- Color optimization, take two
There’s been some interest in this approach from a variety of people for different projects. I even went so far as to create a patch to put this inside GTK+. Unsurprisingly, this patch hasn’t even been looked at due to the maintainer shortage.
So, I’m trying a different approach. I’ve cleaned up the code, slapped the MIT/X11 license on it, and put it in a separate directory to make it easy to cherry-pick. This is kind of libegg-ish right now, though I’d like to make it easier to have an “upstream”. If anyone has any ideas about making this more friendly for svn:externals (viz. Makefile.am), I’d love to hear them!
Get it now from SVN at http://svn.gnome.org/svn/xchat-gnome/trunk/src/libcontrast/
#1 by lurgy on March 30th, 2007
Quote
Hooray!
#2 by Emmanuele Bassi on March 30th, 2007
Quote
I’ve reviewed the patch a bit; the functionality could be interesting, but the patch needs work to conform to the GTK+ conventions for coding style and API behaviour.
#3 by Jakub Steiner on March 30th, 2007
Quote
The functionality sounds very interesting. It’s quite tedious to tweak font colors depending on the lightness of the background manually. Having things work automatically would simplify themes considerably.
Pingback: Lazy mode activated « Yet Another [a compléter]
#4 by Nick on April 8th, 2008
Quote
You know, its kind of hard to take seriously a product that claims to improve contrast when the information posting about it is on a page with bad contrast choices? White background, light grey font, with even lighter grays and light blues and greens for highlights? Um… are you trying to make me squint??