I could think of the following options here:
Calculate the gradient in Javascript of which you should be able
to get the pixel value
How to figure out all colors in a gradient?
Create a hidden canvas with the same gradient and pick the pixel
from this canvas
Use a screenshot library for Javascript and pick the pixel from
the screenshot data.
Using HTML5/Canvas/JavaScript to take screenshots
Canvas and image objects are the only objects you can read pixel values from.
Instead of using a CSS gradient you can create a canvas behind the body of your page and render the gradient into the canvas. After that you can pick a color from the canvas. A complete example is in my answer to the question “How to set an element’s background as the same as a specific portion of web page”.