<button class="btn">Hello</button>
<button class="btn red">Hello</button>
<button class="btn yellow">Hello</button>
<button class="btn green">Hello</button>
<button class="btn orange">Hello</button>
<button class="btn teal">Hello</button>
* {
  margin: 0;
  padding: 0;
}
body {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn {
  padding: 2rem 4rem;
  border: 2px solid var(--color, black);
  background: transparent;
  font-size: 0.6em;
  border-radius: 2px;
}
.btn:hover {
  cursor: pointer;
  background: var(--color, black);
  color: white;
}


/* variations */

.btn.red {
  --color: red
}
.btn.yellow {
  --color: yellow
}
.btn.green {
  --color: green
}
.btn.orange {
  --color: orange
}
.btn.teal {
  --color: teal
}


External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.