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 body is filled with multiple colors. Using a javascript how can i get the rgb or hex color code values of a particular portion of the page?
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?