Color gradient in CSS are created via gradient functions that creates an image.
The definitions and whole list can be found in the specification.
With the linear-gradient 1) function.
linear-gradient() = linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list>)
where:
Example: the french flag
.french-flag {
background-image: linear-gradient(to right, blue 0% 33%, white 33% 66%, red 66% 100%);
height:100px;
width:200px;
border: 1px solid grey;
}
<div class="french-flag"></div>