WIP Remove d3 dependency

Part of #1510 but I could do with some help from someone that knows how the original code was supposed to work.

- [x] Remove `_colorize`.
- [ ] Rework `@html` template to use just html.