An anonymous commenter suggested I use CIE L*a*b* instead of HSV. I’ll let the results speak for themselves:

And that’s without any tweaks, fancy distance metrics, or pushing outside the region when the vector is too short. Whoever you were, thanks for the suggestion! Also, thanks to Madeleine Ball, whose suggestion I misunderstood, but is basically the same.
Update: with some vector extension code (slightly more contrast when colors are really close). The code is in xchat-gnome SVN for everyone to play with now.

#1 by stefan on June 19th, 2006
Quote
I might me color-dumb or what-s-the-point-dumb, but the 2nd example is actually harder to read for me (on one of those new shiny-glossy LCD laptop screens) than the 1st… in other words, light-green on green in screenshot #1 is better than on #2.
Anyway, I guess it’s really hard to tell since #1 includes very readable stuff just a few pixels right and left, maybe it’s all subconscious and blah (reminds me of this weird solarized picture that turns black and white onmouseover, while you think you ‘see’ colors)
#2 by Scott Perry on June 23rd, 2006
Quote
I finally got to sit down and play with the cielab implementation a bit, and I wanted to throw in the colourblind perspective:
http://numist.net/images/cielab-vs-hsv.png
black: doesnt matter. the background colour doesnt do much to it
brown: cielab is much easier for me to read, but harder for me to tell that it’s brown. Then again, the hsv brown looks pretty reddish to me.
cyan: light enough to not matter either way
dark blue: WAY easier to read on hsv
dark green: easier on cielab. On hsv, I can’t even tell that it’s supposed to be *dark* green
dark red: both are decent. I kinda like cielab’s because it’s lighter; easier to spot that it’s red
grey: cielab is far easier to read.
light blue: both results look about the same, but cielab’s is just a touch lighter and easier
light green: doesnt matter
light grey: is the hsv light grey even light? looks far too dark…
orange: the hsv one is richer, cielab’s is easier to read
pink: cielab’s is richer, hsv is easier to read, but it doesnt look pink
purple: cielab’s is hard to read, and the hsv one doesnt even really look very purple
teal: cielab better
white is white.
yellow is close on both too.
I’m rather curious how much of these results depends on the slices that were cut out for each colour, and how much depends on my eye perception. How do you see it?
./scott
#3 by David Trowbridge on June 24th, 2006
Quote
As far as which is easier to read, I agree with your list. Readability should be (almost completely) determined by lightness. Lightness isn’t really something that can easily be reduced to an equation (for any color space), and I’m not sure how colorblindness impacts perception of lightness. As far as improving the readability of things like dark blue, the color regions for CIELAB (especially the script you have) are just my first attempts. I’m sure to be tweaking them for a while as I do more testing.
Pingback: Announcing libcontrast | david’s bloggy journal!
#4 by Tony on March 31st, 2007
Quote
Given Madeleine’s 2nd comment on your last post about this (luminescence delta being the key factor affecting readability), it seems like a bad idea to include named variants of the same colour region with luminescence differentials implied in their names. I.e. Don’t use light-foo and dark-foo or you’ll be in a rough spot when you have light-foo text on a light-foo background.