How I turn any handful of colours into a readable theme
This site ships 18 hand-made themes and 368 base16 schemes. When I measured them, 16 of the first and all 368 of the second broke basic rules about contrast and colour. I wrote the rules down as code, built an engine that repairs a palette with the smallest change it can find, then pointed it at random colours. This is how it works and where it stops.