How Do I Make a Distance-based Color Gradient Material?

Ah, this is perfect. Thank you!