ParentFull threadxhuang·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"View on HN