<button class="btn">Rainbow button color</button>
body {
   text-align: center;
   margin: 7rem auto;
   background: #222;
}
.btn {
   /* reset */
   -webkit-appearance: none;
   border: 0;
   outline: 0;
   /* styles */
   position: relative;
   background: linear-gradient(-45deg, #ffd6d6,#faffb0,#c0ffb6,#d0ddff,#e1bfff);
	background-size: 400% 400%;
	animation: gradientBG 4.5s ease infinite;
   padding: 1.5rem 10rem;
   color: black;
   text-transform:uppercase;
   border-radius: 100px;
   font-size: 1.3rem;
   transition: .3s;
}
@keyframes gradientBG {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.