Unity 3D: Creating colorful gradient-based fog

I wanted to create fog that would change it’s color with on the distance from the camera. My plan was to create post-processing effect that would allow me to define a gradient with various values for color and transparency at different distances. Final effect was supposed to look like this: