mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
update colorpicker and findcolor example code
This commit is contained in:
parent
3578a97a28
commit
f46a93a5e4
@ -44,6 +44,9 @@ func findColor(bmp robotgo.CBitmap) {
|
||||
|
||||
cx, cy = robotgo.FindColor(0xAADCDC, bitmap)
|
||||
fmt.Println("pos...", cx, cy)
|
||||
cx, cy = robotgo.FindColor(0xAADCDC, nil, 0.1)
|
||||
fmt.Println("pos...", cx, cy)
|
||||
|
||||
cx, cy = robotgo.FindColorCS(0xAADCDC, 388, 179, 300, 300)
|
||||
fmt.Println("pos...", cx, cy)
|
||||
|
||||
|
@ -14,6 +14,9 @@ func colorPicker() {
|
||||
|
||||
clo := robotgo.GetPixelColor(x, y)
|
||||
fmt.Println("color: #", clo)
|
||||
|
||||
// clipboard
|
||||
robotgo.WriteAll("#" + clo)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user