How did Goftrey do it in his iOX theme?
EDIT: If you look through the resources of the Dock.app, you find images of the 2d dock. But changes will only be seen if you activate the 2d dock on the bottom, not the sides.
The actual dock itself is hard-coded black, but the surrounding edges etc. are images. This was my issue when I had a go at recreating the Yosemite dock - as far I can see there isn't a way to make an even close to authentic looking replica.
The closest thing I could think of was to create a "Dark Mode" Yosemite theme, as a modified Leopard 2D dock, with custom made edges etc. to mimic the Yosemite dock as closely as possible would be a little closer to reality than the white/clear one.
However after thinking about it a little longer I realised that I'd end up with even more work on my hands as I'd have to then in turn switch every menubar around across the system, along with system-wide font changes.
TLDR: It's too much work to end up with a product that doesn't even look authentic.