0

我尝试使用此代码,但它显示“元组”对象不能解释为整数”

import autopy
creen = autopy.bitmap.capture_screen();
po = tuple(screen.find_color((255,117,99),0.05));
4

1 回答 1

1

find_color 需要两个参数, acolor和 a float。您可以将元组转换为这样的颜色:

import autopy
screen = autopy.bitmap.capture_screen()
po = screen.find_color(autopy.color.rgb_to_hex(255,117,99),0.05)
于 2020-04-24T16:41:10.960 回答