So currently I have a navigation bar that I'm trying to fade blueish grey (top) to transparent (bottom). The nav bar is fixed so my intention is that it would blend in with the background when I scroll down instead of a solid bluesh grey line. I browsed many threads about this and people seem to suggest the linear-gradient function; however, it gives me a weird output. This is my navbar css:
.navbar {
background: linear-gradient(#e5ecf5, rgba(0,0,0,0));
}
Here is a picture of the example output (ignore the weird formating): screenshot
Notice how the gradient turns darker than the actual greyish blue color. It can't be the color #e5ecf5 because that's the color I used as the body background. I also tried rgb format for the hex value to no avail.
edit: Here is a chunk of my code on codepen: https://codepen.io/GMTChan/pen/BdVyjQ