How to use Jython (Robot) to get a pixel color in R,G,B format and then convert it to HEX.
This is my code so far.
import sys
import os
import java.awt.Robot
import java.awt.Color
def get_pixels(posX, posY):
robot = Robot()
Color = getPixelColor(posX, posY)
r = color.getRed()
g = color.getGreen()
b = color.getBlue()
color = "#{:02x}{:02x}{:02x}".format(r,g,b)
return Color
get_pixels(200, 300)
Well, i found out how to make it work, am gonna share my code anyways.
#Jython
Thanks, regards!