Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Calculating Color Contrast for Legible Text (particletree.com)
22 points by dhotson on Sept 23, 2008 | hide | past | favorite | 3 comments


Sweet! They developed this and used it in Wufoo. I love it when research/lab work is immediately useful for live systems.

A while ago, I wrote a little library to give a new random palette of colors using the ColorMatch.dk http://colormatch.dk/ algorithm - 7 color random palette: http://chir.ag/tech/download/7-color-random-palette/ (php). I used it a while for my tech blog and it worked pretty well. There is some code in there to make sure the foreground/background contrast is handled well, though I don't think it's as optimal as in the linked article. Still, could be interesting for others who like colors.


This is also a good resource: http://colorfilter.wickline.org/

Lets you see what your site looks like with various forms of color-blindness.


Where were you a while ago? I had a long discussion on wikipedia trying to find a formula, but was unsuccessful: http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Archiv...

And BTW, just black or white is not enough. There are some colors that are hard to read with either black or white. See the the wiki archive for some examples.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: