1 karma · joined May 17, 2010 (16y ago) · 2 submissions
comment 16y ago · link · parent
'#000' if int(my_color, 16) > 0xffffff/2 else '#fff'
This approach isn't perfect, but it does the job.