Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
In HTML emails, always set text and background colors in pair (kuon.ch)
4 points by kuon on June 7, 2020 | hide | past | favorite | 2 comments


This, and don't use transparent images without setting background either please! I've gotten emails from large companies that were completely white, because someone assumed a certain background color


Transparent images can also be a problem outside emails, image viewers can have different background colors.

I had this issue when I was working on a embed project (similar to embed.ly), some websites had transparent image (in open graph or schema.org) and not all of them were expecting white background, so I have to crawl the page and try to detect the background color best suited for the image. This didn't work well (and required crawling the page) so I ended up doing edge detection on the image (easy with transparency) and average the resulting color to find the best background.




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

Search: