You can’t use Java methods directly, and even in a Perspective module you’ll have a hard time doing this in a satisfactory way. You can only retrieve colors from HTML canvas elements, or images converted into canvas elements, it looks like; and even then, only from the same origin (due to browser security restrictions).
A potentially better option, but one highly dependent on your environment, would be a color
input element, which might, depending on your browser + platform, have an eyedropper:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color
But that would be very flakey, and requires a custom module as well.
1 Like