update colorpicker and findcolor example code

This commit is contained in:
vcaesar 2019-05-18 10:49:12 -04:00
parent 3578a97a28
commit f46a93a5e4
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -14,6 +14,9 @@ func colorPicker() {
clo := robotgo.GetPixelColor(x, y)
fmt.Println("color: #", clo)
// clipboard
robotgo.WriteAll("#" + clo)
}
}