-Click the foreground color swatch. Choose a dark color. ( For example a royal blue)
-Click the background colour swatch. Choose a lighter shade of that color. ( For example light blue)
-Select the gradient tool, its behind the paint bucket.
-Drag a Foreground to Background gradient threw the pill shape.

-Colors Chosen Here: Royal - #0018FF, Aqua - #00EFE7