I was having a look at the "Reputation" tab in Stackoverflow and it occurred to me that the yellow used to highlight the new entries doesn't stand out a lot from the white background. I really have to screw up my eyes to see the difference.
That made me think: is there any rule to know if two colors are going to appear distinct enough to the user's eyes? For example, while #FFFFFE and #FFFFFF are two different colors, it's obvious there won't be any noticeable difference to the human eye. In general at what point do we know that two colors are going to appear clearly different?