mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-23 17:59:12 +00:00
update colorpicker and findcolor example code
This commit is contained in:
parent
3578a97a28
commit
f46a93a5e4
2 changed files with 6 additions and 0 deletions
|
|
@ -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 a new issue