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.
I'm speaking some nonsense, actually. The length of both `buckets` and `index` are the same. They are both `<bucket count> + 6` where 6 comes from adding an invisible "empty" bucket on either side of each of the top and bottom buckets used to break up the gradient so it didn't extend to the edge.

What's confusing though is that the stop data is actually twice as many. Two entries per bucket.