A linear gradient from red to blue can be created with:
background: linear-gradient(
rgb(255,0,0),
rgb(0,0,255))
To create this:
If you instead faded red to transparent and placed that on a blue background with:
background: linear-gradient(
rgb(255,0,0),
rgb(255,0,0,0)),
rgb(0,0,255);
The result is exactly the same:
In the first example, the center of the image would have RGB values (127.5, 0, 127.5), by linear interpolation.
In the second example, the center of the image is a combination of a partially transparent red (127.5, 0, 0, 0.5) and a solid blue (0, 0, 255). How are these combined to create the same (127.5, 0, 127.5) result as in the first example?