Tag: BitTwiddling
-
Generating unique, contrasting colors in JavaScript
While working on my DOM course for LinkedIn Learning I had to solve a problem I’ve come across several times in my career. It shows up when generating graphs, or in my case when you want to show nested rectangles with contrasting colors. Like most problems, I started using the “smart friend” trick that I…