Create a hexadecimal colour based on a string with Elm
Wed, Aug 22, 2018 in /web-programmer/I had an html table of categorised items, and I wanted to give each category its own colour automatically. So I thought I’d hash the category ID String into an HTML Hexadecimal colour. A search will find this stack overflow post, but I was using elm and thought it would be a fun task to translate this function into a functional style. Here’s how that went:
