I used Gradient to set the color for my HTML body background.
CSS:
background: linear-gradient(to top, #fb4080 10%,#ebb523 22%,#58d27c 40%,#2aff00 52%,#0fd2b7 65%,#6b6dff 80%,#ff05ea 100%);
Now the body is filled with multiple colors. How can I get the RGB or hex color code values of a particular portion of the page using javascript?
Example:
If I scroll my page, I want to get the color of the top portion of the page(the color inside the highlighted portion not exactly but values near to it) So that I can assign/set that color code to another element on my page like Navigation bar, Menu etc
Any suggestions?