Hacker News new | past | comments | ask | show | jobs | submit login

The HTML5 color parsing algorithm is less complex than it seems. Mostly it boils down to "take any characters that aren't hex digits and replace them with zeroes, then truncate the resulting string in a consistent way to produce a 24-bit value".



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

Search: