From 43e1594f590c2cef08cb6f577641ef4d6e500639 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Thu, 28 Mar 2019 12:56:46 -0400 Subject: [PATCH] add get mouse color function --- robotgo.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/robotgo.go b/robotgo.go index 7e86b7f..e2afef5 100644 --- a/robotgo.go +++ b/robotgo.go @@ -196,6 +196,12 @@ func GetPixelColor(x, y int) string { return gcolor } +// GetMouseColor get the mouse pos's color +func GetMouseColor() string { + x, y := GetMousePos() + return GetPixelColor(x, y) +} + // ScaleX get primary display horizontal DPI scale factor func ScaleX() int { return int(C.scale_x())