Hacker News new | ask | show | jobs
by xhuang 5808 days ago
This is ugly, but it should do the job:

"#000000" if sum([int(i,16) for i in re.findall("..",myColour)]) > 382.5 else "#ffffff"