We often declare variables for colors, mostly at the top of file, as following:
:root{
--color-primary: #...;
}
The colors then can be reused with the `var` function:
.btn--primary{
background-color:var(--color-primary);
}
If you're using Visual Studio Code, then you don't have to type `var(...)` completely. Instead, just type `--` and Visual Studio Code suggests the existing color variables.