I want to get color when I hover on this div. Remember that I need a color code where my mouse actually is (look like a color picker) , I am not talking about to get the elm style background-color.
[NOTE] We can get elm style using Window.getComputedStyle()
, But it's not my answer.
.test{
height: 150px;
width: 250px;
background-image: linear-gradient(90deg,rgb(255, 0, 0) 0,rgb(255, 255, 0) 17%,rgb(0, 255, 0) 33%,rgb(0, 255, 255) 50%,rgb(0, 0, 255) 67%,rgb(255, 0, 255) 83%,rgb(255, 0, 0));
cursor: pointer;
}
<div class="test"></div>