it also depends if you want transparency or not
.jpg is best used for keeping gradients but does not have transparency, it also does have a good compression size
.gif tends to lose some detail on gradients, but has transparency, and has a small file size
.png is a mixture of them both, it was designed for the web. It has transparency, and it doesn't lose the gradients.