the development blog
has the latest news and tips
Here's a picture you may have seen before:
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
████████████████████
When I look at this, I see a gradient of several different colors. The top two lines are red, then one line orange, then one line yellow, five are gray, one is light blue, four are dark blue, two are purple, two are pink, and the bottom one is red again.
What's surprising about this is that each line is the same distance from any other on the color wheel. The first and second lines that both look red to me? They're just as far away from each other as the second and third lines, one of which looks red and one of which looks orange.
It's not just me, of course. Most people see things this way. In 1928 W. David Wright conducted an experiment in which he placed people down in front of a split screen. On one side, Wright would project a color and on the other was projected a color that the subject could control via various dials. The subject's job was to attempt to match the color he saw on the left with a color he made on the right. After his experiments (and an independent set of similar experiments by John Guild in 1931) they constructed a map of the colors as we humans perceived them. The International Commission on Illumination (CIE) constructed a standard from the results in 1931, creating the CIE XYZ color space.
Apparently their model wasn't quite right, though, since CIE1931 was replaced by CIELUV and then CIELAB and S-CIELAB and CIEDE2000 and on until the present day.
So why do we even care about any of this? Well, color comes up in a lot of places on a website, but the big one is today's new feature: "Who wrote what?" (more colloquially known as the blame button). On a history page, you can now click "Who wrote what?" and see, color-coded, who wrote each piece of text. Mouse over a word and your browser should pop up a little dialog saying who wrote it and when. (For a decent example of how this works, check out the javascript wiki.)
But here's where the color problems come in. Each user gets a different color (blue, red, yellow) and that color is made lighter the older the text is. Right now we do the simple thing of giving them all equally-distant colors but this runs right into the above problems. Unfortunately, coming up with equally distant colors for human perception seems a lot harder than coming up with equally distant colors for the computer to present. So we haven't actually done the right thing -- we use the same color model you see pictured above.
But if anyone out there is interested in helping us out, we'd love to get the answer really right.
BTW, I want to thank two people who worked with me early on for the infogami proejct who wrote pretty much all the code that makes these features work and work so well. Sean B. Palmer wrote the code to pick the colors and Zack Coburn wrote the code to figure out who wrote which piece. It was wonderful working with them.
-- Aaron, March 23, 006
powered by infogami.
made by not a bug.